summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2016-05-17 12:24:54 +0100
committerAaron Crane <arc@cpan.org>2016-05-17 12:44:26 +0100
commit24963b0a8d4dddbe29a3709011cab46fdc3deee1 (patch)
tree5eec9612d57afd8bd537f29f58e34ea295a667df /utils
parent72e11947ab9e3d00b1e7fb7fd4f7bbbaa9d8b69d (diff)
downloadperl-24963b0a8d4dddbe29a3709011cab46fdc3deee1.tar.gz
perlbug: don't run editor when noninteractive
This fixes tests on Win32.
Diffstat (limited to 'utils')
-rw-r--r--utils/perlbug.PL6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index 6290ca76e8..720cf1203f 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -95,6 +95,8 @@ my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress,
%opt, $have_attachment, $attachments, $has_patch, $mime_boundary
);
+my $running_noninteractively = !-t STDIN;
+
my $perl_version = $^V ? sprintf("%vd", $^V) : $];
my $config_tag2 = "$perl_version - $Config{cf_time}";
@@ -103,7 +105,7 @@ Init();
if ($opt{h}) { Help(); exit; }
if ($opt{d}) { Dump(*STDOUT); exit; }
-if (!-t STDIN && !$opt{t} && !($ok and not $opt{n})) {
+if ($running_noninteractively && !$opt{t} && !($ok and not $opt{n})) {
paraprint <<"EOF";
Please use $progname interactively. If you want to
include a file, you can use the -f switch.
@@ -753,7 +755,7 @@ sub Edit {
$ed = $entry unless $entry eq '';
}
- _edit_file($ed);
+ _edit_file($ed) unless $running_noninteractively;
}
sub _edit_file {