tests/common.bash: use $status, not $?, when using `run`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 17 Oct 2017 19:25:25 +0000 (15:25 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 17 Oct 2017 19:25:25 +0000 (15:25 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/common.bash

index f1424b43ee25520c3bf2bc5d67b5938b0c590d69..3ea89981d5250d7d8536cd90286ff9743ec44f63 100644 (file)
@@ -28,8 +28,12 @@ barectf_assert_file_exists() {
     return 1
   fi
 
+  if ! which barectf > /dev/null; then
+    echo "FATAL: cannot find barectf tool" 1>&2
+    return 1
+  fi
+
   run barectf "$1"
-  local rc=$?
   popd
-  return $rc
+  return $status
 }
This page took 0.028666 seconds and 4 git commands to generate.