Skip to content
Snippets Groups Projects
Commit ce3d975f authored by Andy Yates's avatar Andy Yates
Browse files

Fix to the non-interactive mode and for when no password is given

parent 51188143
No related branches found
No related tags found
No related merge requests found
......@@ -530,6 +530,7 @@ while ( $sth->fetch() ) {
$apply_patches = (lc($yesno) =~ /^y(?:es)?$/) ? 1 : 0;
}
else {
$apply_patches = 1;
print "Enterning non-interative mode. Will apply patches\n";
}
......@@ -539,14 +540,14 @@ while ( $sth->fetch() ) {
my $patch = $entry->{'patch'};
my $path = $entry->{'path'};
my @cmd_list = ( $opt_mysql,
"--host=$opt_host",
"--user=$opt_user",
"--password=$opt_pass",
"--port=$opt_port",
"--database=$database",
"--verbose",
"--execute=source $path" );
my @cmd_list = ( $opt_mysql,
"--host=$opt_host",
"--user=$opt_user");
push(@cmd_list, "--password=$opt_pass") if $opt_pass;
push(@cmd_list, "--port=$opt_port",
"--database=$database",
"--verbose",
"--execute=source $path" );
printf( "Executing the following command:\n%s\n",
join( ' ', @cmd_list ) );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment