summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--write_buildcustomize.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl
index 709923baa2..92c75de93e 100644
--- a/write_buildcustomize.pl
+++ b/write_buildcustomize.pl
@@ -65,8 +65,12 @@ if ($error) {
close $fh
or warn "Can't unlink $file after error: $!";
} else {
- close $fh and exit;
- $error = "Can't close $file: $!";
+ if (close $fh) {
+ do $file and exit;
+ $error = "Can't load generated $file: $@";
+ } else {
+ $error = "Can't close $file: $!";
+ }
}
# It's going very wrong, so try to remove the botched file.