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 /sboinstall | |
parent | 50f048b798478ba98c6e8043b7e518815f9f8c3a (diff) | |
download | sbotools2-da1b7f300ad26b9410c11ef0e5c49b783cc29c67.tar.xz |
sbo*, SBO::Lib::*: make use of prompt() for getting user input
Diffstat (limited to 'sboinstall')
-rwxr-xr-x | sboinstall | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -13,7 +13,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib qw/ %config _ERR_OPENFH get_arch get_build_queue get_installed_cpans get_installed_packages get_sbo_location get_sbo_locations merge_queues open_fh print_failures process_sbos show_version slackbuilds_or_fetch slurp usage_error user_prompt /; +use SBO::Lib qw/ %config _ERR_OPENFH get_arch get_build_queue get_installed_cpans get_installed_packages get_sbo_location get_sbo_locations merge_queues open_fh print_failures process_sbos prompt show_version slackbuilds_or_fetch slurp usage_error user_prompt /; use Getopt::Long qw(:config bundling); use File::Basename; use JSON::PP; @@ -207,8 +207,7 @@ FIRST: for my $sbo (@$build_queue) { exit 0 if @{ $build_queue } == 0; say "\nInstall queue: " . join(' ', @$build_queue); unless ($non_int) { - print "\nAre you sure you wish to continue? [y]: "; - exit 0 unless <STDIN> =~ /^[Yy\n]/; + exit 0 unless prompt("\nAre you sure you wish to continue?", default => 'yes'); } if (defined $ctemp) { |