mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 20:51:27 +00:00
scstadmin: Check $answer before using it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -5929,7 +5929,8 @@ sub prompt {
|
||||
"are you sure you wish to continue (y/[n]) ? ";
|
||||
my $answer = <STDIN>;
|
||||
|
||||
if (($answer =~ /^y$/i) || ($answer =~ /^yes$/i)) {
|
||||
if (defined($answer) &&
|
||||
(($answer =~ /^y$/i) || ($answer =~ /^yes$/i))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user