16451: do not leave testargs as a space when there are no opts provided.
authorWard Vandewege <ward@jhvc.com>
Wed, 20 May 2020 13:54:08 +0000 (09:54 -0400)
committerWard Vandewege <ward@jhvc.com>
Wed, 20 May 2020 14:00:10 +0000 (10:00 -0400)
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@jhvc.com>

build/run-tests.sh

index 70aec2aa145f744d62e836409a33acfcae757a9e..ff6ead0facc26bbb0e1141d118b4cd81a70ec4c0 100755 (executable)
@@ -1266,15 +1266,11 @@ else
     while read -p 'What next? ' -e -i "$nextcmd" nextcmd; do
         history -s "$nextcmd"
         history -w
-        read verb target opt1 opts <<<"${nextcmd}"
         count=1
-        if [[ "$verb" =~ ^[0-9]+$ ]]; then
-          count=$verb
-          verb=${target}
-          target=$opt1
-        else
-          opts="$opt1 $opts"
+        if [[ "${nextcmd}" =~ ^[0-9] ]]; then
+          read count nextcmd <<<"${nextcmd}"
         fi
+        read verb target opts <<<"${nextcmd}"
         target="${target%/}"
         target="${target/\/:/:}"
         case "${verb}" in