diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-07 00:26:22 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-07 00:26:22 +0200 |
commit | da1b7f300ad26b9410c11ef0e5c49b783cc29c67 (patch) | |
tree | 95fe851682cfd3305c3d5551f41e9a0017dd7a9a /SBO-Lib/lib/SBO/Lib/Repo.pm | |
parent | 50f048b798478ba98c6e8043b7e518815f9f8c3a (diff) | |
download | sbotools2-da1b7f300ad26b9410c11ef0e5c49b783cc29c67.tar.xz |
sbo*, SBO::Lib::*: make use of prompt() for getting user input
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib/Repo.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib/Repo.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Repo.pm b/SBO-Lib/lib/SBO/Lib/Repo.pm index b4205a6..e8e7c2e 100644 --- a/SBO-Lib/lib/SBO/Lib/Repo.pm +++ b/SBO-Lib/lib/SBO/Lib/Repo.pm @@ -6,7 +6,7 @@ use warnings; our $VERSION = '2.0'; -use SBO::Lib::Util qw/ %config usage_error get_slack_version script_error open_fh open_read in /; +use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in /; use Cwd; use File::Copy; @@ -338,8 +338,7 @@ C<$repo_path>, and if not, offer to run C<sbosnap fetch> for you. sub slackbuilds_or_fetch { unless (chk_slackbuilds_txt()) { say 'It looks like you haven\'t run "sbosnap fetch" yet.'; - print 'Would you like me to do this now? [y] '; - if (<STDIN> =~ /^[Yy\n]/) { + if (prompt("Would you like me to do this now?", default => 'yes')) { fetch_tree(); } else { say 'Please run "sbosnap fetch"'; |