You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running pub global activate in a docker container and it is displaying git related errors.
the pubspec.yaml doesn't reference git so I don't understand why pub is trying to get the git version no.
The error:
pub global activate dcli
The top level `pub` command is deprecated. Use `dart pub` instead.
Package dcli is currently active at version 1.17.5.
Resolving dependencies... (3.1s)
The package dcli is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate dcli`.
Installed executables dcli, dcli_complete, dcli_install and dshell_upgrade.
Git command is not "git": Pub failed to run subprocess `git`: ProcessException: No such file or directory
Command: git --version
Git command is not "git.cmd": Pub failed to run subprocess `git.cmd`: ProcessException: No such file or directory
Command: git.cmd --version
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):
export PATH="$PATH":"$HOME/.pub-cache/bin"
Activated dcli 1.17.5.
root@0f1b0ec0276f:/dcli/dcli# dart --version
Dart SDK version: 2.16.1 (stable) (Unknown timestamp) on "linux_x64"
root@0f1b0ec0276f:/dcli/dcli#
``
The dockerfile
Package.listFiles needs git to find the repository root to find all gitignores. But we don't need to take gitignores into account when listing executables of an activated package. Now this is only used during the pub publish flow.
I'm running pub global activate in a docker container and it is displaying git related errors.
the pubspec.yaml doesn't reference git so I don't understand why pub is trying to get the git version no.
The error:
FROM ubuntu:20.04
WORKDIR /
ENV HOME=/home
RUN touch /home/.profile
RUN apt -y update && apt -y install apt-transport-https wget gpg && wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/dart.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list
RUN apt -y update && apt -y upgrade && apt -y install vim wget dart
ENV PATH="$PATH:/usr/lib/dart/bin"
Add the entire dart project so we can run from the local filesystem
ADD .
CMD ["/bin/bash"]
sudo docker build -f $dockerFilePath -t dcli:dev_dcli_cli .
sudo docker run -it dcli:dev_dcli_cli /bin/bash
The text was updated successfully, but these errors were encountered: