-
Notifications
You must be signed in to change notification settings - Fork 143
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
topgrade can't find pipx installed from scoop #725
Comments
This is so similar to #720
Is there any way to detect a shim and automatically "dereference" it? |
Except for identifying it from paths, is there any general method so that perhaps we can apply it to the which crate? |
I don't think there is, I don't understand why topgrade even have problem with running pipx.cmd. |
This is unfortunate, I am curious about the usage of these shim files, and how PowerShell identifies them and automatically dereferences them?
From the log, Topgrade identifies this |
In pipx case, pipx.cmd is just a script with this contents:
|
Shims are just executables, there are no need to explicitly support them in any software, they just work. |
I am not familiar with Windows, based on my UNIX experience, it is kinda similar to symlinks, right? Most UNIX syscalls will dereference symlinks when encountered, including the syscall used to replace a process $ cat main.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(void) {
char *args[] = {"ls", "-l"};
int res = execve("link_to_ls", args, NULL);
if (res == -1) {
perror("execve");
}
exit(EXIT_SUCCESS);
}
$ gccs main.c
$ ./a.out
-rwxr-xr-x. 1 steve steve 16784 Mar 4 07:42 a.out
lrwxrwxrwx. 1 steve steve 11 Mar 4 07:40 link_to_ls -> /usr/bin/ls
-rw-r--r--. 1 steve steve 226 Mar 4 07:40 main.c And it seems that the corresponding Windows syscall won't do this? |
As I said above, pipx installed from scoop is just a script(pipx.cmd) with these contents, not a shim executable like i thougt initially: @rem C:\Users\user\scoop\apps\pipx\current\pipx.bat
@"C:\Users\user\scoop\apps\pipx\current\pipx.bat" %* pipx.bat: @python "%~dp0pipx.pyz" %* |
The strange thing is that topgrade can execute |
Well, this is actually same with #720, and it has been fixed in the latest main branch: |
Erroneous Behavior
Topgrade cannot find pipx from scoop:
Expected Behavior
It should be able to use it as i can use it from shell just fine:
Steps to reproduce
topgrade --cleanup --only 'pipx'
Possible Cause (Optional)
scoop using shims, maybe this somehow prevents topgrade from using pipx.
Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
If yes, does the issue still occur when you run topgrade directlly in your
remote host
Configuration file (Optional)
Additional Details
Windows 11 Pro 23H2
From scoop.
topgrade -V
)Topgrade 14.0.1
Verbose Output (
topgrade -v
)The text was updated successfully, but these errors were encountered: