diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-26 00:22:39 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-26 00:22:39 +0200 |
commit | 5fb9ccc59727cef63249440200ebb35435b8ccd9 (patch) | |
tree | 0a7baeaecf1c9d8b6840e724c7c6db0a454aae57 /SBO-Lib/lib/SBO/Lib.pm | |
parent | e2834f606a50144ab92e54db830d2fdb06102d78 (diff) | |
download | sbotools2-5fb9ccc59727cef63249440200ebb35435b8ccd9.tar.xz |
SBO::Lib check_repo(): guard make_path in an eval
so we get the correct exit status and error message
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |