commit 5fb9ccc59727cef63249440200ebb35435b8ccd9
parent e2834f606a50144ab92e54db830d2fdb06102d78
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Thu, 26 May 2016 00:22:39 +0200
SBO::Lib check_repo(): guard make_path in an eval
so we get the correct exit status and error message
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
@@ -285,7 +285,7 @@ sub check_repo {
usage_error("$repo_path exists and is not empty. Exiting.\n");
}
} else {
- make_path($repo_path) or usage_error("Unable to create $repo_path.\n");
+ eval { make_path($repo_path) } or usage_error("Unable to create $repo_path.\n");
}
return 1;
}