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

scoop bin path should not be added at the begninng of the existing PATH string #2523

Open
copdips opened this issue Aug 22, 2018 · 2 comments

Comments

@copdips
Copy link
Contributor

copdips commented Aug 22, 2018

Hello,

The ensure_in_path function in core.ps1 adds the scoop bin path at the beginning of the PATH, which might cause some unexpected problem if some other existing path has the same exe.

Usually, we should append the new path (scoop one here) to the existing PATH.

https://github.com/lukesampson/scoop/blob/master/lib/core.ps1#L426
https://github.com/lukesampson/scoop/blob/master/lib/core.ps1#L427

maybe following code is better:

env 'PATH' $global "$path;$dir" # for future sessions...
$env:PATH = "$env:PATH;$dir" # for this session

same thing for the function add_first_in_path
https://github.com/lukesampson/scoop/blob/master/lib/install.ps1#L1035

@sebma
Copy link

sebma commented Dec 3, 2020

@copdips Hi, I just came across your issue and couldn't help but notice your were working on the ensure_in_path function which is called by the ensure_scoop_in_path function.

I cannot install scoop on my system because the ensure_scoop_in_path function needs a non-null ($global) argument however the scoop installer calls it without any argument (https://github.com/lukesampson/scoop/blob/master/bin/install.ps1#L72).

I have seen any commit on this project since a month.

Can you give a little bit of your time to help me with issue #4177 ?

@sebma
Copy link

sebma commented Dec 3, 2020

@copdips Found it 😄
I had an env alias which was causing a conflict with the scoop env function (a function which I didn't know was defined).

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