Skip to content

Commit f4a60e6

Browse files
committed
Capture and print config.yaml eval failure
1 parent 2ebad45 commit f4a60e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/generate-zbm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ if ( defined $runConf{migrate} ) {
111111

112112
if ( -r $runConf{config} ) {
113113
eval {
114+
local $SIG{'__DIE__'};
114115
my $yaml = YAML::PP->new( boolean => 'boolean' )->load_file( $runConf{config} );
115116
%config = %$yaml;
116117
} or do {
@@ -127,8 +128,13 @@ omit the `--config` option, an output location
127128
$default_config
128129
129130
will be used by default.
131+
132+
----
133+
130134
EOF
131135
print $error;
136+
137+
warn $@ if $@;
132138
exit 1;
133139
};
134140
} else {

0 commit comments

Comments
 (0)