summaryrefslogtreecommitdiff
path: root/test/testenv
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-15 18:52:31 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-15 20:04:31 -0400
commit86ee52ddc0cf2d09c1789dd9c1dcbcc98b9b45c0 (patch)
tree890c31533e969448afc8b909f954bd114bc6dc17 /test/testenv
parent197640f845f6a57c60fbcd2d56cdf902d4772acd (diff)
testenv: verify that there is a command passed
I keep running it without any arguments, thinking that I am now working inside of the test environment, when really it just exited right away with a 0 status.
Diffstat (limited to 'test/testenv')
-rwxr-xr-xtest/testenv5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testenv b/test/testenv
index e6c882f..847a948 100755
--- a/test/testenv
+++ b/test/testenv
@@ -15,6 +15,11 @@ while [[ $# -gt 0 ]]; do
done
export NETWORK SUDO
+if [[ $# == 0 ]]; then
+ echo 'You need to run testenv with arguments!' >&2
+ exit 1
+fi
+
# Set up the working directory, and add the hook to clean it up
export TMPDIR="$(mktemp --tmpdir -d libretools-test.XXXXXXXXXX)"
trap "rm -rf '$TMPDIR'" EXIT