Fix sync.sh to call run.exe -p even if positional parameters are specified after --.
authorBrian Robbins <brianrob@microsoft.com>
Wed, 27 Jun 2018 01:22:46 +0000 (18:22 -0700)
committerBrian Robbins <brianrob@microsoft.com>
Wed, 27 Jun 2018 18:19:37 +0000 (11:19 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/b45be1f57aad2197cebed21c025a69ac3fe8ebad

src/coreclr/sync.sh

index ab0fb57..8d8b167 100755 (executable)
@@ -13,7 +13,9 @@ working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 unprocessedBuildArgs=
 
 # Parse arguments
-if [ $# == 0 ]; then
+# Assume the default '-p' argument if the only arguments specified are specified after double dash.
+# Only position parameters can be specified after the double dash.
+if [ $# == 0 ] || [ $1 == '--' ]; then
     buildArgs="-p"
 fi