-
Notifications
You must be signed in to change notification settings - Fork 149
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
fix(poetry): parse arg in script shebang line #1028
Conversation
8cb5d47
to
36abea6
Compare
Thanks for the patch! @AThePeanut4 cc @tsvikas, here is a build for Linux with this patch included, welcome to give it a test: https://github.com/SteveLauC/topgrade/releases/tag/pr1028 |
36abea6
to
361f3f1
Compare
thanks! just checked - the patch does work with my poetry :) however, it seems that the behaviour around uv changed
i am using uv 0.5.30 - this is the most recent version available on dnf (fedora 41) |
verbose output:
|
The uv error is not related to this PR, so I will merge this PR:) Thanks for the patch again! @AThePeanut4 |
@tsvikas, please do: $ uv self --help
$ echo $? And paste the output Update: no need to provide the output, I installed |
@tsvikas I'd assume that's caused by #1000, which was merged after the v16.0.2 release. This PR doesn't change anything related to the uv step. @SteveLauC The issue there is that |
@AThePeanut4, I think we need to revert https://github.com/topgrade-rs/topgrade/pull/971/files, but reverting it will make #942 happen again 🫠 |
awesome thanks! (shouldn't we move the uv issue to a new issue?) FYI - uv developers seems very responsive, you might want to request them to have different error codes for 'self update not supported' vs 'self update failed' |
We continue the issue there #942
Yeah, we should reach out to them if we cannot solve this ourselves |
What does this PR do
Parse the shebang line in the poetry wrapper script to ignore leading spaces, and split out any arguments, so that e.g.
#! /usr/bin/python3 -sP
doesn't error. On Windows, take into account the possibility that the interpreter path may be double-quoted so that it can contain spaces.Fixes #1021
Standards checklist
[CONTRIBUTING.md](http://contributing.md/)