Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path variable #33256

Closed
BaileyJM02 opened this issue May 28, 2018 · 1 comment
Closed

Path variable #33256

BaileyJM02 opened this issue May 28, 2018 · 1 comment

Comments

@BaileyJM02
Copy link

BaileyJM02 commented May 28, 2018

  • Dart VM version: 2.0.0-dev.58.0 (Unknown timestamp) on "linux_x64"
  • Linux Ubuntu 18, but probably all OS

When using commands such as pub global activate [package] I was given the following error:

Warning: Pub installs executables into ~/.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":"~/.pub-cache/bin"

However, with hours of dispear and annoyance that the fix provided didn't work, I have finally found a solution and feel, to save other peoples time, I will ask you to fix it.

Instead of this:

export PATH="$PATH":"~/.pub-cache/bin"

It should be

export PATH="$PATH:$HOME/.pub-cache/bin"
@natebosch
Copy link
Member

The details of the expansion do depend on your shell and where you are adding the export (could differ between .profile and .bash_profile for instance).

I do think that "$HOME" is likely to work with more consistency than "~".

natebosch added a commit to dart-lang/pub that referenced this issue May 29, 2018
Closes dart-lang/sdk#33256

The details of variable expansion when setting the PATH variable are a
little hard to follow. `"$HOME"` should work in more places than `"~"`
natebosch added a commit to dart-lang/pub that referenced this issue May 29, 2018
Closes dart-lang/sdk#33256

The details of variable expansion when setting the PATH variable are a
little hard to follow. `"$HOME"` should work in more places than `"~"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants