Error: the `add-path` command is deprecated and will be disabled on November 16th
Martinsos opened this issue · 8 comments
When using your action, I get following error/warning:
Setting up ghc-8.10.1 (8.10.1-17~18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...
Error: The `add-path` command is deprecated and will be disabled on November 16th. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Found ghc 8.10.1 in cache at path /opt/ghc/8.10.1/bin. Setup successful.
Here is the exact job: https://github.com/wasp-lang/wasp/pull/135/checks?check_run_id=1391335318#step:4:77 .
FYI: these errors are gone in 1.1.3. Example:
- name: Setup Haskell toolchain
uses: actions/setup-haskell@v1.1.3
There are two different things going on here.
- Users on mac or ubuntu should update to the latest version
v1.1.3
or use the sliding tagv1
to ensure they have the latest fixes for this issue. - Windows users: We've identified a bug where ghc on install wipes the environment variables in the session, causing us to fallback to the old
add-path
pattern because the environment variable flow requires theGITHUB_PATH
variable to be set
It appears the ghc choco repo automatically runs the old command, I filed an issue to get that fixed Mistuke/GhcChoco#10
hi, builds now fails with:
Error: Unable to process command '::add-path::C:\ProgramData\chocolatey\lib\ghc.8.10.1\tools\ghc-8.10.1\bin' 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/
https://github.com/haskell/ghcide/runs/1410598735?check_suite_focus=true
@thboop what can we do on the Windows in the meantime, is there a way to go around this?
I am using "v1" and it works ok on ubuntu/macos, but as you said, build on Windows fails.
@Martinsos please see the PR here for mitigation, you should be able to opt into enabling these commands until a fix for this action is in place.
We are aiming to get a new version of setup-haskell
published in the next day or so to resolve the issue on windows.
This has been fixed in version v1.1.4
and the v1
tag has been updated! Thank you all for your patience.