-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Poetry changes sys.argv[0]? #480
Comments
import os
import sys
os.path.basename(sys.argv[0]) |
@fridex That doesn't really fix the problem. If the user did type in the full path with that code, he would only get the basename. |
Ah, OK. You want to replicate the whole invocation. That makes sense 👍 |
@fridex Correct :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue. I think it relates to #965. |
Duplicate of #965 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Question
Hi. For the help menus in my CLI scripts, I like to print usage instructions like this:
But Poetry seems to change sys.argv[0] to the full path of the script, instead of keeping what the user actually typed in. Why? Is there any way around this?
The text was updated successfully, but these errors were encountered: