]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1381567 - wrap heredoc in an if
authorEmma Humphries <emceeaich@users.noreply.github.com>
Sat, 22 Jul 2017 01:26:13 +0000 (18:26 -0700)
committerDylan William Hardison <dylan@hardison.net>
Sat, 22 Jul 2017 01:26:13 +0000 (21:26 -0400)
scripts/resolve_bugs.pl

index 31f38aae83e844b523a1bfadf616a905aaac4a9b..70ed30c239e0d83e101705286ea52007c9424e04 100755 (executable)
@@ -57,12 +57,15 @@ if ($bug_count == 0) {
     exit 1;
 }
 
-print STDERR <<EOF;
+# if running from commmand line
+if (-t STDIN) {
+    print STDERR <<EOF;
 About to resolve $bug_count bugs as $resolution
 
 Press <Ctrl-C> to stop or <Enter> to continue...
 EOF
-getc();
+    getc();
+}
 
 foreach my $row (@$data) {
     my $bug_id = shift @$row;