about summary refs log tree commit homepage
path: root/script/public-inbox-edit
diff options
context:
space:
mode:
Diffstat (limited to 'script/public-inbox-edit')
-rwxr-xr-xscript/public-inbox-edit3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/public-inbox-edit b/script/public-inbox-edit
index a70614fc..81f023bc 100755
--- a/script/public-inbox-edit
+++ b/script/public-inbox-edit
@@ -183,7 +183,8 @@ retry_edit:
         # rename/relink $edit_fn
         open my $new_fh, '<', $edit_fn or
                 die "can't read edited file ($edit_fn): $!\n";
-        my $new_raw = do { local $/; <$new_fh> };
+        defined(my $new_raw = do { local $/; <$new_fh> }) or die
+                "read $edit_fn: $!\n";
 
         if (!$opt->{raw}) {
                 # get rid of the From we added