-
Notifications
You must be signed in to change notification settings - Fork 7
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
env activation is not persistent throughout the session #12
Comments
Thanks for providing the bug as well as the current fix at the same time 😃 setup-conda/src/conda_actions.ts Lines 62 to 67 in a0b8f8a
When I finally got some time to write the unit tests and implement the |
Unless I'm missing something, that code-snipped there spawns a new sub-shell, activate the env in there, and when that sub-shell exits, it's like nothing has ever happened. |
Just as a future reference, when I finally got time to implement those changes 😞 |
@all-contributors please add @basic-ph for bug |
I've put up a pull request to add @basic-ph! 🎉 |
…e <env_name>' output instead running a tmp script in a subshell see #12
…e <env_name>' output instead running a tmp script in a subshell see #12
…e <env_name>' output instead running a tmp script in a subshell see #12
…e <env_name>' output instead running a tmp script in a subshell see #12
* 🧹 Fixed typos in readme * ♻️ Refactored env activation to use 'conda shell.<shell_name> activate <env_name>' output instead running a tmp script in a subshell see #12 * 🧪 Added job to check if env activation persists * 👌 Changed logging to use groups for a cleaner log * 🧹 Remove env activation test Env activation will be a feature for v2 * 🧪 Activate env var testing * 🧹 Removed obsolete warining from readme * 🧹 Removed insecsure env var logging
Describe the bug
If the command
source activate <env-name>
is executed in a previous step respect to one in which the environment is used, the env itself does not result activated and raise for using a command that is not installed in the base env.To Reproduce
the actual YAML file with the workflow:
the following error is reported in the Actions log:
Workaround
At the moment the only way I found to make it work is to run
source activate feat
also before the usage of the environment (in my casepytest
command) like this:The text was updated successfully, but these errors were encountered: