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

Modify PATH on userscripts call to include path to python executable #491

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jo-basevi
Copy link
Collaborator

Add directory to python executable to PATH, so this is used for user scripts run with #!/usr/bin/env python3

Closes #490.

@coveralls
Copy link

coveralls commented Aug 21, 2024

Coverage Status

coverage: 56.019% (+0.2%) from 55.779%
when pulling 1562c61 on ACCESS-NRI:490-userscripts-default-python-executable
into cf01e0f on payu-org:master.

Copy link
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a really nice implementation!

Is there any way this could be easily tested? Like maybe a subprocess call to return the result of /usr/bin/env python3?

@jo-basevi jo-basevi force-pushed the 490-userscripts-default-python-executable branch from 0049fb0 to 1562c61 Compare August 22, 2024 06:39
@jo-basevi
Copy link
Collaborator Author

Added a test which mocks out the value which fails to run without the added changes of modifying the $PATH

@jo-basevi jo-basevi marked this pull request as ready for review August 22, 2024 06:44
@jo-basevi jo-basevi marked this pull request as draft September 25, 2024 23:25
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.

Userscripts default to /bin/python3
3 participants