Subject: | Missing exit code check when running migrate-* scripts. |
You should also check exit code as noted in the IPC::Run3 man page.
"Note that a true return value from run3 doesn't mean that the command
had a successful exit code. Hence you should always check $?."
+++ /usr/local/share/perl/5.10.0/ORLite/Migrate.pm 2009-06-16
14:21:04.000000000 +0200
@@ -112,7 +112,7 @@
print STDERR "Applying schema patch $patch...\n";
}
my $ok = IPC::Run3::run3( [ $perl, $patch ], \$stdin, \undef,
$DEBUG ? undef : \undef );
- unless ( $ok ) {
+ if ( !$ok or $? != 0 ) {
Carp::croak("Migration patch $patch failed, database in unknown
state");
}
}