Closed maximunited closed 3 months ago
This is something about scoop, which is interfering with Clink. It's also not normal behavior for scoop. You'll probably need to look for help in the scoop forums.
Specific details follow:
So I installed clink via scoop. now with each new version I do the following:
> scoop update
> clink update
Specifically how did install clink via scoop?
I tried it just now, and scoop installed it in ~\scoop\apps\clink\current\
.
There's no version number in the directory name.
I tried clink autorun install
and it also doesn't have a version number in the directory name:
C:\Users\chrisant>clink autorun install
Current AutoRun values
Current user:
native : "C:\Users\chrisant\scoop\apps\clink\current\clink.bat" inject --autorun
wow64 : "C:\Users\chrisant\scoop\apps\clink\current\clink.bat" inject --autorun
All users:
native : <unset>
wow64 : <unset>
Clink successfully installed to run when cmd.exe starts (for current user).
Then when I type
clink info
, the version does show the latest, but this version does not match the value ofbinaries
or thescripts
. It also shows an "old" version in theclink autorun show
.Example where version is 1.6.5, and other values are 1.6.3:
...
What is the "correct" way to update?
The problem is that somehow scoop has gotten into an unusual state where it's putting the version number in the directory name. That breaks installing for AutoRun, since installing for AutoRun has to use the full pathname, which then gets invalidated with each new version.
How did scoop come to put the version number in the directory name?
That's something about scoop, not about Clink. I don't know much about scoop, so I can't directly help.
I figured out what's going on:
You ran clink autorun install
after Clink was already injected.
Injecting Clink defines an alias clink
which points to the exact copy of Clink that was loaded -- and that ends up getting the version number in the directory name.
clink autorun install
before Clink was injected, then typing clink
would cause CMD to search for Clink in the system PATH, and it would find the directory name with "current", and then that's what would get registered for AutoRun (instead of the version number directory).%userprofile%\scoop\apps\clink\current\clink autorun install
then that would work fine.So, at this point, then simplest thing is just run %userprofile%\scoop\apps\clink\current\clink autorun install
, and that should get you back into a normal state where scoop and clink can coexist fine.
(And I'll try to see if there's anything Clink can do to compensate for what scoop is doing, but no guarantees since Clink has no control over scoop.)
I believe I found a way to compensate for what scoop is doing, so that the clink
alias can end up pointing at scoop's "current" app directory symlink, instead of at the actual app version directory.
Thanks for the workaround. Manually succeeded to overcome:
scoop update clink
clink autorun uninstall
%userprofile%\scoop\apps\clink\current\clink autorun install
%userprofile%\scoop\apps\clink\current\clink inject
(Step 3 by itself is the key. The other steps weren't needed.)
Actually I've tried that step separetly previously. Didnt help. Unless I must run it as a full path, not just clink autorun install
Yes. I said you have to run it as the full exact path.
Literally run
%userprofile%\scoop\apps\clink\current\clink autorun install
Running something else, such as clink autorun install
, is not the same as running %userprofile%\scoop\apps\clink\current\clink autorun install
.
So I installed clink via scoop. now with each new version I do the following:
> scoop update
> clink update
Then when I type
clink info
, the version does show the latest, but this version does not match the value ofbinaries
or thescripts
. It also shows an "old" version in theclink autorun show
.Example where version is 1.6.5, and other values are 1.6.3:
and:
What is the "correct" way to update?