From 86ee52ddc0cf2d09c1789dd9c1dcbcc98b9b45c0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 15 Oct 2013 18:52:31 -0400 Subject: 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. --- test/testenv | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.2