-
Notifications
You must be signed in to change notification settings - Fork 896
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
uv run powershell script fails #9010
Comments
Is this the same as #8770? |
@charliermarsh it's probably at least related. I think there are two different issues here.
|
Did a test with nuitka and I think the problem is indeed the same as part 1 of this problem.
then
fails with
but
works as expected |
The reason for issue number 1 e.g. not being able to call a cmd script without the extension is given here. https://doc.rust-lang.org/std/process/struct.Command.html#platform-specific-behavior
Unlike powershell / cmd's behaviour |
We can fix the display of these (#9099), but I don't know if |
From my perspective that would not make a big difference. My main concern is that I have to special case between windows and linux when running commands in CI e.g. I tried migrating from creating and activating a venv to using For now I was able to work around the specific issue in azure pipelines (I expect this works in github actions too) by doing
E.g. running pyright from a powershell core session inside uv run. This works since Azure pipelines ships with powershell 7 installed on all platforms. |
I think the ideas is that
Yeah this is my concern. We don't plan do this for other shells and languages, i.e., |
If pyright is installed from npm it will install itself with a cmd and powershell entry point on windows and a shell script on linux.
When trying to run this script using
uv run
, to run it in uv's managed .venv on windows, it errors unless the cmd script is supplied or an explicit powershell is prefixed.This is inconvenient since it means that the same command cannot be used to typecheck the code using pyright on windows and linux.
In summary:
The following does not work on windows:
uv run pyright
errors with
uv run pyright.ps1
errors with:
The following works:
On windows:
uv run pyright.cmd
uv run powershell pyright.ps1
On linux:
uv run pyright
uv run pyright
Windows 11
The text was updated successfully, but these errors were encountered: