Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pipelines/process/set-variables-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
- job: B
dependsOn: A
variables:
myVarFromJobA: $[ dependencies.A.outputs['passOutput.myOutputVar'] ]
myVarFromJobA: $[ dependencies.A.outputs['A.passOutput.myOutputVar'] ]
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependencies.<job>.outputs[...] key for job-to-job dependencies within the same stage is documented elsewhere as '<step-name>.<variable-name>' (no job-name prefix). Using ['A.passOutput.myOutputVar'] here appears inconsistent with expressions.md and variables.md examples, and is likely to produce a lookup miss at runtime. Consider reverting to ['passOutput.myOutputVar'], or (if the intent is cross-stage) switch the example to stageDependencies and include the stage/job qualifiers accordingly.

Suggested change
myVarFromJobA: $[ dependencies.A.outputs['A.passOutput.myOutputVar'] ]
myVarFromJobA: $[ dependencies.A.outputs['passOutput.myOutputVar'] ]

Copilot uses AI. Check for mistakes.
steps:
- bash: |
echo $(myVarFromJobA)
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
- job: B
dependsOn: A
variables:
myVarFromJobA: $[ dependencies.A.outputs['passOutput.myOutputVar'] ]
myVarFromJobA: $[ dependencies.A.outputs['A.passOutput.myOutputVar'] ]
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above: for job-to-job dependencies within a single stage, the outputs key is typically '<step-name>.<variable-name>' (for example dependencies.A.outputs['passOutput.myOutputVar']). Prefixing the job name (A.passOutput...) is inconsistent with other docs in this repo and likely incorrect for this scenario.

Suggested change
myVarFromJobA: $[ dependencies.A.outputs['A.passOutput.myOutputVar'] ]
myVarFromJobA: $[ dependencies.A.outputs['passOutput.myOutputVar'] ]

Copilot uses AI. Check for mistakes.
steps:
- powershell: |
Write-Host $(myVarFromJobA)
Expand Down