Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Attempting to use Stack 2.7.3 results in "add-path disabled" error #88

Closed
istathar opened this issue Dec 5, 2021 · 1 comment
Closed

Comments

@istathar
Copy link

istathar commented Dec 5, 2021

Requesting stack version 2.7.3 (current "latest") results in this notice

stack 2.7.3 was not found in the cache. It will be downloaded.
If this is unexpected, please check if version 2.7.3 is pre-installed.
The list of pre-installed versions is available here: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
The above list follows a common haskell convention that the latest release of stack is commonly supported.

which then failed with

Unable to process command '::add-path::/opt/hostedtoolcache/stack/2.7.3/x64' successfully.

and

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/

No doubt I'm holding it wrong, but I thought it pertinent to let you know.

istathar added a commit to istathar/hello that referenced this issue Dec 5, 2021
@istathar
Copy link
Author

istathar commented Dec 5, 2021

I think this was user error.

-          uses: actions/setup-haskell@v1.1
+          uses: haskell/actions/setup@v1.2

appears to have fixed it

      steps:
        - name: Setup GHC
          uses: haskell/actions/setup@v1.2
          with:
            enable-stack: true
            stack-no-global: true
            stack-setup-ghc: true
            ghc-version: '8.10.7'
            stack-version: '2.7.3'

is working (successful CI run).

For what it's worth there's a lot of blog posts and examples out there that show the thing that I got wrong, so it was easy to copy and paste.

Thanks for your hard work on the action for setting up Haskell.

@istathar istathar closed this as completed Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant