Skip to content

Commit 8ed5756

Browse files
azure-sdkraych1Copilot
authored
Sync eng/common directory with azure-sdk-tools for PR 10664 (#2610)
* Add option to perserve auth * Update eng/common/pipelines/templates/steps/sparse-checkout.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: ray chen <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent ed20079 commit 8ed5756

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eng/common/pipelines/templates/steps/sparse-checkout.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ parameters:
1414
- name: TokenToUseForAuth
1515
type: string
1616
default: ''
17+
- name: PreserveAuthToken
18+
type: boolean
19+
default: false
1720

1821
steps:
1922
- ${{ if not(parameters.SkipCheckoutNone) }}:
@@ -137,7 +140,7 @@ steps:
137140
pwsh: true
138141
workingDirectory: $(System.DefaultWorkingDirectory)
139142

140-
- ${{ if ne(parameters.TokenToUseForAuth, '') }}:
143+
- ${{ if and(ne(parameters.TokenToUseForAuth, ''), not(parameters.PreserveAuthToken)) }}:
141144
- pwsh: |
142145
git config unset --global "http.extraheader"
143146
displayName: Removing git config auth header

0 commit comments

Comments
 (0)