Skip to content

shellcheck SC2154 for gh_aw_exit_code in the agent execution step #65941

Closed

Description

@WilliamBerryiii

Summary

shellcheck 0.11.0 reports SC2154 (gh_aw_exit_code is referenced but not assigned) in Execute GitHub Copilot CLI in every compiled lock file with an agent job. The variable is assigned inside the single-quoted trap '...' EXIT string from buildAgentExecutionExitCodeTrapWithCleanup (pkg/workflow/engine_helpers.go), which shellcheck does not parse.

Version

gh-aw v0.89.21; shellcheck 0.11.0.

Expected

The generated script is shellcheck-clean. For example, move the trap body into a function, or declare gh_aw_exit_code before the trap.

Activity

  1. locked and limited conversation to collaborators on Oct 5, 2026
  2. unlocked this conversation on Oct 5, 2026
  3. pelikhan commented on Oct 6, 2026

    @pelikhan
    Collaborator

    @copilot add spellcheck validation test in csh.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions