Open thesobercoder opened 5 years ago
+1
scoop reset
option will also benefit from this.
currently after scoop reset python
you need to re-open the command shell, for using the "right" pip version.
yayaya, I need it badly*999999999999
Related PR opened by someone else: https://github.com/lukesampson/scoop/pull/2136
Not sure which is the correct approach, but in my brief research, the refreshenv.cmd command from chocolatey is superseded by this in PowerShell: https://github.com/chocolatey/choco/blob/stable/src/chocolatey.resources/helpers/functions/Update-SessionEnvironment.ps1
If Scoop, instead of injecting the full path of the apps in the global/user PATHs, includes a reference to the *_HOME variables of each app (which, by the way, Scoop already creates them), that would be fantastic, and it would leave the PATHs global /user much more optimized.
Or, if you include in a third variable, something like SCOOP_APPS_PATH, and then this is included in the global/user PATHs, that would also be nice.
It has been fixed long time ago.
❯ scoop install nodejs-lts
Installing 'nodejs-lts' (20.17.0) [64bit] from 'main' bucket
Loading node-v20.17.0-win-x64.7z from cache
Checking hash of node-v20.17.0-win-x64.7z ... ok.
Extracting node-v20.17.0-win-x64.7z ... done.
Linking ~\scoop\apps\nodejs-lts\current => ~\scoop\apps\nodejs-lts\20.17.0
Adding ~\scoop\apps\nodejs-lts\current\bin to your path.
Adding ~\scoop\apps\nodejs-lts\current to your path.
Persisting bin
Persisting cache
Running post_install script...done.
'nodejs-lts' (20.17.0) was installed successfully!
❯ node --version
v20.17.0
@HUMORCE while this works in Powershell, it does not work in a Command Prompt:
PS C:\> scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)
...
PS C:\> scoop install nodejs-lts
Installing 'nodejs-lts' (20.17.0) [64bit] from 'main' bucket
Loading node-v20.17.0-win-x64.7z from cache
Checking hash of node-v20.17.0-win-x64.7z ... ok.
Extracting node-v20.17.0-win-x64.7z ... done.
Linking C:\Scoop\apps\nodejs-lts\current => C:\Scoop\apps\nodejs-lts\20.17.0
Adding C:\Scoop\apps\nodejs-lts\current\bin to your path.
Adding C:\Scoop\apps\nodejs-lts\current to your path.
Persisting bin
Persisting cache
Running post_install script...done.
'nodejs-lts' (20.17.0) was installed successfully!
PS C:\> node --version
v20.17.0
C:\>scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)
...
C:\>scoop install nodejs-lts
Installing 'nodejs-lts' (20.17.0) [64bit] from 'main' bucket
Loading node-v20.17.0-win-x64.7z from cache
Checking hash of node-v20.17.0-win-x64.7z ... ok.
Extracting node-v20.17.0-win-x64.7z ... done.
Linking C:\Scoop\apps\nodejs-lts\current => C:\Scoop\apps\nodejs-lts\20.17.0
Adding C:\Scoop\apps\nodejs-lts\current\bin to your path.
Adding C:\Scoop\apps\nodejs-lts\current to your path.
Persisting bin
Persisting cache
Running post_install script...done.
'nodejs-lts' (20.17.0) was installed successfully!
C:\>node --version
'node' is not recognized as an internal or external command,
operable program or batch file.
Thanks for point out
I just noticed that some apps like
nodejs
don't have shims, now I don't have enough knowledge as to why, but these apps put append thepath
but the path is not refreshed automatically and hence I've to close and re-open the prompt again.Chocolatey has a script
refreshenv
script to do the same, would it be possible to incorporate something like that inscoop
.