Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set PSNativeCommandArgumentPassing to Legacy for git push script #5794

Merged
1 commit merged into from
Mar 24, 2023
Merged
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: 4 additions & 0 deletions eng/common/scripts/git-branch-push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ param(
[boolean] $AmendCommit = $false
)

# Explicit set arg parsing to Legacy mode because some of the git calls in this script depend on empty strings being empty and not passing a "" git.
# more info https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.3#psnativecommandargumentpassing
$PSNativeCommandArgumentPassing = "Legacy"

# This is necessary because of the git command output writing to stderr.
# Without explicitly setting the ErrorActionPreference to continue the script
# would fail the first time git wrote command output.
Expand Down