Skip to content

Commit 1e17495

Browse files
committed
Use array for command_args to ensure quoting is retained
1 parent f079d4c commit 1e17495

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/run-kani.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ usage() {
1414
}
1515

1616
# Initialize variables
17-
command_args=""
17+
declare -a command_args
1818
path=""
1919
run_command="verify-std"
2020
with_autoharness="false"
@@ -50,7 +50,7 @@ while [[ $# -gt 0 ]]; do
5050
;;
5151
--kani-args)
5252
shift
53-
command_args="$@"
53+
command_args=("$@")
5454
break
5555
;;
5656
*)
@@ -217,7 +217,7 @@ run_verification_subset() {
217217
$harness_args --exact \
218218
-j \
219219
--output-format=terse \
220-
$command_args \
220+
"${command_args[@]}" \
221221
--enable-unstable \
222222
--cbmc-args --object-bits 12
223223
}
@@ -299,7 +299,7 @@ main() {
299299
"$kani_path" verify-std -Z unstable-options ./library \
300300
$unstable_args \
301301
--no-assert-contracts \
302-
$command_args \
302+
"${command_args[@]}" \
303303
--enable-unstable \
304304
--cbmc-args --object-bits 12
305305
fi
@@ -310,7 +310,7 @@ main() {
310310
"$kani_path" autoharness -Z autoharness -Z unstable-options --std ./library \
311311
$unstable_args \
312312
--no-assert-contracts \
313-
$command_args \
313+
"${command_args[@]}" \
314314
--enable-unstable \
315315
--cbmc-args --object-bits 12
316316
elif [[ "$run_command" == "list" ]]; then

0 commit comments

Comments
 (0)