Skip to content
Snippets Groups Projects
Commit ced0e983 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed interactive checking

parent 2aead4db
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,15 @@ sub execute { ...@@ -44,7 +44,15 @@ sub execute {
#$config{logdir} = $opt->{logdir}; #$config{logdir} = $opt->{logdir};
$config{http_only} = $opt->{http_only}; $config{http_only} = $opt->{http_only};
my $in_test = $ENV{TEST_ACTIVE}; my $in_test = $ENV{TEST_ACTIVE};
local *IO::Prompt::Tiny::_is_interactive = sub {$in_test}; # fake it for testing # next lines to fake interactive for testing
local *IO::Prompt::Tiny::_is_interactive = *IO::Prompt::Tiny::_is_interactive;
if ($in_test) {
*IO::Prompt::Tiny::_is_interactive = sub {$in_test};
}
if (defined $opt->{debug}) {
say STDERR "Is test active? ", $ENV{TEST_ACTIVE} ? "true" : "false";
say STDERR "Is interactive? ", IO::Prompt::Tiny::_is_interactive() ? "true" : "false";
}
say STDERR "HINT: The password stored in config file!"; say STDERR "HINT: The password stored in config file!";
my $user = prompt('User:'); my $user = prompt('User:');
RETRY: RETRY:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment