-
-
Notifications
You must be signed in to change notification settings - Fork 47
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 script execution in non-PATH directories #156
Conversation
Typically on UNIX systems a non-zero code is a failed exit code. The code here doesn't catch anything except 1 but 127 is possible when it cannot find the scripts as seen in issue jdoiro3#122. Higher numbers are possible when a signal interrupts the execution. Switch to treating all non-zero codes as an error.
Version Number CheckVersion has been updated in pyproject.toml. |
@cardoe - thanks for contributing! Could you re-lock and push a commit so we can run tests? I'll take a look at the PR soon. |
The code assumes that where this package is installed will result in the scripts living in bash's PATH. If the user is using a virtualenv and uses a shell other than bash then it won't be in the PATH and it will fail. This uses the functionality that Python 3.9 added in importlib to create a temp file with a resource included in the package to run the script. For older versions of Python the backport package is installed and used. fixes jdoiro3#122
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes. Thanks again!
Thanks. Lemme know what I need to do to get it in a release. |
@jdoiro3 https://github.com/jdoiro3/mkdocs-multirepo-plugin/actions/runs/10361895254/job/28683098702 looks like the release failed. I think it should be a quick fix and just re-run CI. |
If the user used a virtualenv and did not have the virtualenv in their PATH. Or they used another shell like zsh and the install location of this plugin was not in bash's PATH (since it forces execution with bash) then it would just silently fail.