From 5fb9ccc59727cef63249440200ebb35435b8ccd9 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Thu, 26 May 2016 00:22:39 +0200 Subject: SBO::Lib check_repo(): guard make_path in an eval so we get the correct exit status and error message --- SBO-Lib/lib/SBO/Lib.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SBO-Lib/lib') diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 5bafe0f..8db5b2f 100644 --- 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; } -- cgit v1.2.3