Skip to content
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

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Conversation

cardoe
Copy link
Contributor

@cardoe cardoe commented Aug 9, 2024

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.

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.
Copy link

github-actions bot commented Aug 9, 2024

Version Number Check

Version has been updated in pyproject.toml.

@jdoiro3
Copy link
Owner

jdoiro3 commented Aug 12, 2024

@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
@cardoe
Copy link
Contributor Author

cardoe commented Aug 12, 2024

@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.

Done!

Copy link
Owner

@jdoiro3 jdoiro3 left a 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!

@cardoe
Copy link
Contributor Author

cardoe commented Aug 12, 2024

Thanks. Lemme know what I need to do to get it in a release.

@jdoiro3 jdoiro3 merged commit df7b9be into jdoiro3:main Aug 13, 2024
14 checks passed
@cardoe
Copy link
Contributor Author

cardoe commented Aug 13, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants