Skip to content

Runner v2.273.6 start to error out due to ::set-env name #125

Closed

Description

Description:
Starting with runner versions >2.273.6 the runners error out if the syntax ::set-env is used.

Task version:
1.4.3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted, version: 2.277.1

Repro steps:
Take any runner above 2.273.6 and setup-java, e.g. with:

      - name: Configure java 11
        uses: actions/setup-java@v1
        with:
          java-version: 11
          server-id: maven-public
          server-username: NEXUS_USER
          server-password: NEXUS_PASSWORD

Expected behavior:
Works.

Actual behavior:
Errors out with:

::set-env name=JAVA_HOME_11_0_10_X64::/opt/hostedtoolcache/jdk/11.0.10/x64
##[error]Unable to process command '::set-env name=JAVA_HOME_11_0_10_X64::/opt/hostedtoolcache/jdk/11.0.10/x64' 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/
##[debug]System.Exception: 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/
##[debug]   at GitHub.Runner.Worker.SetEnvCommandExtension.ProcessCommand(IExecutionContext context, String line, ActionCommand command, ContainerInfo container)
##[debug]   at GitHub.Runner.Worker.ActionCommandManager.TryProcessCommand(IExecutionContext context, String input, ContainerInfo container)
::add-path::/opt/hostedtoolcache/jdk/11.0.10/x64/bin
##[error]Unable to process command '::add-path::/opt/hostedtoolcache/jdk/11.0.10/x64/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/

Due to:
actions/runner#779
actions/runner#784

Activity

  1. ghost added
    bugSomething isn't working
    on Feb 22, 2021
  2. maxim-lobanov commented on Feb 22, 2021

    @maxim-lobanov
    Contributor

    Hello @dominikmeyersap ,
    This task was updated to use environments files 5 months ago via #104
    Both v1 and v1.4.3 contains these changes. Also I can't reproduce it on Hosted runner.

    Do you use GitHub Enterprise? (as far as I know it requires manual sync of task version)

  3. ghost closed this as completedon Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions