Skip to content

Validator incorrectly flags runner.debug as invalid #365

@walbourn

Description

@walbourn

Add to a GitHub Actions YAML file (assuming a Windows runner)

jobs:
  build:
    steps:
    - name: Test
      shell: cmd 
      working-directory: ${{ github.workspace }}
      run: ctest --preset=${{ matrix.build_type }} %CTEST_DEBUG_OPTS%
      env:
        CTEST_DEBUG_OPTS: ${{ runner.debug == '1' && '--output-on-failure' || '' }}

The VS Code Extensions flags it as a warning:

"Context access might be invalid"

Per this PR, this was previously undocumented but is supported:

github/docs#19404

Note that runner.debug doesn't work at global scope or at job scope, only at steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done 💤

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions