From 96e31aa9820b92d546f36d2e9e6d223706ee3af2 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Thu, 1 Sep 2016 13:04:53 +0200 Subject: SBO::Lib::Readme: Fix user_prompt() behaviour and fix up tests for it --- SBO-Lib/lib/SBO/Lib/Readme.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SBO-Lib/lib/SBO/Lib/Readme.pm') diff --git a/SBO-Lib/lib/SBO/Lib/Readme.pm b/SBO-Lib/lib/SBO/Lib/Readme.pm index a16bb49..c5fb95c 100644 --- a/SBO-Lib/lib/SBO/Lib/Readme.pm +++ b/SBO-Lib/lib/SBO/Lib/Readme.pm @@ -174,7 +174,7 @@ sub user_prompt { my ($sbo, $location) = @_; if (not defined $location) { usage_error("Unable to locate $sbo in the SlackBuilds.org tree."); } my $readme = get_readme_contents($location); - usage_error("Could not open README for $sbo.") unless defined $readme; + return "Could not open README for $sbo.", undef, _ERR_OPENFH if not defined $readme; if (is_local($sbo)) { print "\nFound $sbo in local overrides.\n"; } # check for user/group add commands, offer to run any found my $user_group = get_user_group($readme); -- cgit v1.2.3