Uh oh!
There was an error while loading. Please reload this page.
feature: add update-environment input - #411
Conversation
| "dependencies": { | ||
| "@actions/cache": "^2.0.2", | ||
| "@actions/core": "^1.2.3", | ||
| "@actions/core": "^1.7.0", |
There was a problem hiding this comment.
This required to be bumped to >= 1.3.0 to get getBooleanInput support. I bumped to the same version as what's being proposed in #406
mayeut
commented
May 26, 2022
|
brcrista
left a comment
There was a problem hiding this comment.
I'd like to explore other solutions besides adding complexity to the action.
Can you just add steps to the composite action? For example:
# Save the environmentset> env.sh
# Restore the environmentsource env.shmayeut
commented
May 26, 2022
@brcrista, For exportVariable: For addPath, it's values are always prepended to the "current" PATH, c.f. actions/toolkit#655 |
Hi @mayeut, I have some concerns about this feature. In order to use python that is installed by action without $PATH updating you should use exact paths to the installed python in a composite action. If there are any other tools in composite action which use python implicitly, then these tools will not use the version you expect. This can lead to confusion about which python version is used in some command or tool. From my point of view an installation of python without adding to PATH may create more complications than solve problems. |
mayeut
commented
Jun 4, 2022
This is an opt-in feature. It won't change a thing for existing users. If they choose to opt-in, they shall know the implications. As said in an earlier comment, it's just impossible to restore the environment as it was before running |
vsafonkin
commented
Jun 6, 2022
@mayeut, ok, I see. Since the AzDev |
2d144fe to
48426e9Compare
brcrista
left a comment
There was a problem hiding this comment.
I'll defer to @vsafonkin on this
| no-environment-update: | ||
| description: 'Set this option if you want the action not to update environment variables.' | ||
| default: false |
There was a problem hiding this comment.
| no-environment-update: | |
| description: 'Set this option if you want the action not to update environment variables.' | |
| default: false | |
| update-environment: | |
| description: 'Set this option if you want the action to update environment variables.' | |
| default: true |
Putting boolean inputs in positive terms is usually easier for people to understand.
This option allows to specify if the action shall update environment variables (default) or not. This allows to use the setup-python action in a composite action without side effect (except downloading/installing python if version is missing).
no-environment-update inputupdate-environment inputdisallow actions/setup-python from changing environment variables; see: actions/runner#781actions/setup-python#411
This option allows to specify if the action shall update environment variables (default) or not. This allows to use the setup-python action in a composite action without side effect (except downloading/installing python if version is missing).
Description:
This option allows to specify if the action shall update environment variables (default) or not.
This allows to use the
setup-pythonaction in a composite action without side effect (except downloading/installing python if version is missing).Related issue:
fix#410
Check list: