Setup-miniconda: The `add-path` command and `set-env` command is disabled

Created on 17 Nov 2020  ·  11Comments  ·  Source: conda-incubator/setup-miniconda

SOLUTION: Simply update your goanpeca/setup-miniconda@v1 hook to conda-incubator/setup-miniconda@v2 and the error should go away.


It looks like something changed to Github Actions today, as our setup-miniconda hook is breaking with the following error:

Add "/usr/share/miniconda/condabin" to PATH
Error: Unable to process command '::add-path::/usr/share/miniconda/condabin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
/usr/share/miniconda/condabin/conda config --add pkgs_dirs /home/runner/conda_pkgs_dir
Error: Unable to process command '::set-env name=CONDA_PKGS_DIR::/home/runner/conda_pkgs_dir' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

See our error in more detail here.

And the workflow code here.

I found that this is affecting other hooks, so I imagine it must be a Github Actions change. E.g., https://github.com/djjudas21/camerahub/issues/630, https://github.com/apache/incubator-tvm/issues/6925.


EDIT: Actually it looks like GA announced this back in October, but went into effect today.

duplicate bug

Most helpful comment

Yep, just pinned it :)

Dark GitHub feels wrong 😄

All 11 comments

See #99.

Agh, sorry, thought I was ahead of the curve here. Appreciate you guys addressing it so fast!

Hi @bradyrx thanks for the report. Indeed a duplicate of #99

@jaimergp we could live this open (cause this one already has the duplicated context) and tag it on the issue tracker? Maybe that way is easier to find for otrher users?

Oh, sure, nice idea. There might be more reports coming. Shall we also pin it for a week or so?

Yep, just pinned it :)

Screen Shot 2020-11-17 at 11 16 21

@bradyrx Can you add a little comment on your opening message stating the solution for visibility?

Yep, just pinned it :)

Dark GitHub feels wrong 😄

Done, thanks guys! Easy fix and quick communication.

cheers, guys! will buy pints if this works well for us too :beer:

cheers, guys! will buy pints if this works well for us too beer

it works very well with the new hooks - much appreciated, folks here! :beer:

Closing this one, I think we should be fine moving forward :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrmundt picture mrmundt  ·  12Comments

sadielbartholomew picture sadielbartholomew  ·  8Comments

ma-sadeghi picture ma-sadeghi  ·  16Comments

magland picture magland  ·  4Comments

ma-sadeghi picture ma-sadeghi  ·  4Comments