Skip to content

Commit 81c5aea

Browse files
committed
Build arg list with an array
This should avoid an issue with parsing the arg list later on, that is somehow triggered by two semicolons in the string
1 parent 049f29c commit 81c5aea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

eng/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,14 @@ function Test() {
239239
testbatchsuffix="_batch$testbatch"
240240
fi
241241
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework$testbatchsuffix.trx"
242-
args="test \"$testproject\" --no-build -c $configuration -f $targetframework --logger \"trx;LogFileName=$testlogpath\" --logger \"console;verbosity=normal\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration"
242+
243+
args=(test "$testproject" --no-build -c "$configuration" -f "$targetframework" --logger "trx;LogFileName=$testlogpath" --logger "console;verbosity=normal" --blame-hang-timeout 5minutes --results-directory "$artifacts_dir/TestResults/$configuration")
243244

244245
if [[ "$testbatch" != "" ]]; then
245-
args="$args --filter batch=$testbatch"
246+
args+=(--filter "batch=$testbatch")
246247
fi
247248

248-
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
249+
"$DOTNET_INSTALL_DIR/dotnet" "${args[@]}" || exit $?
249250
}
250251

251252
function BuildSolution {

0 commit comments

Comments
 (0)