-
Notifications
You must be signed in to change notification settings - Fork 5
allow loading poetry path #27
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
base: release/v2
Are you sure you want to change the base?
Conversation
load-poetry-path: | ||
description: > | ||
Set to "true" to add the path to the poetry executable to the PATH. | ||
required: false | ||
default: "false" |
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.
Why not default to true
as a sane default?
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.
Mostly wanted to avoid changing the action default behaviour. WDYT?
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.
Feels like nothing would change for existing consumers of the action if we default to true
.
- name: Load poetry path | ||
run: | | ||
echo "$(poetry env info -p)/bin" >> "${GITHUB_PATH}" | ||
if: "${{ inputs.load-poetry-path == 'true' }}" |
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.
As an alternative, what about just using poetry run xxx
?
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.
This also works, but third-party scripts might expect the "binary" name to be available without having to go through poetry. (typically the case when installing ansible for example)
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.
Is that an actual use case yet? Link?
This allows to call commands installed through poetry without going through
python -m <module>..
This is used extensively in ESS-Helm repo.