Skip to content

Commit

Permalink
Provide a way to intentionally allow empty text input
Browse files Browse the repository at this point in the history
  • Loading branch information
japhb committed Sep 23, 2023
1 parent baa8dae commit 37a9797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MUGS/App/CLI.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class MUGS::App::CLI is MUGS::App::LocalUI {
method text-input(Str:D $label, Str :$default) {
my $styled = self.styled-prompt($default ?? "$label [$default]:" !! "$label:");
my $input;
until $input {
until $input.defined {
my $raw = $!input.prompt($styled);
return unless $raw.defined;
$input = $raw.trim || $default;
Expand Down

0 comments on commit 37a9797

Please sign in to comment.