Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 7634 (#41790)
Browse files Browse the repository at this point in the history
* Fix sparse-checkout git command line behavior

* Use command arg parsing behavior in sparse-checkout.yml

---------

Co-authored-by: Daniel Jurek <[email protected]>
  • Loading branch information
azure-sdk and danieljurek authored Feb 6, 2024
1 parent f250ca2 commit b07b8f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eng/common/pipelines/templates/steps/sparse-checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ steps:
# Define this inline, because of the chicken/egg problem with loading a script when nothing
# has been checked out yet.
script: |
# Setting $PSNativeCommandArgumentPassing to 'Legacy' to use PowerShell
# 7.2 behavior for command argument passing. Newer behaviors will result
# in errors from git.exe.
$PSNativeCommandArgumentPassing = 'Legacy'
function SparseCheckout([Array]$paths, [Hashtable]$repository)
{
$dir = $repository.WorkingDirectory
Expand Down

0 comments on commit b07b8f3

Please sign in to comment.