diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-15 18:52:31 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-15 20:04:31 -0400 |
commit | 86ee52ddc0cf2d09c1789dd9c1dcbcc98b9b45c0 (patch) | |
tree | 890c31533e969448afc8b909f954bd114bc6dc17 /test | |
parent | 197640f845f6a57c60fbcd2d56cdf902d4772acd (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')
-rwxr-xr-x | test/testenv | 5 |
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 |