diff options
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 2 | ||||
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 1da5afd2..0c807b72 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -162,6 +162,8 @@ sub parseopts { "keep-debug" => \$options{KEEP_DEBUG}, + "error-handler=s" => \$options{ERROR_HANDLER}, + "<>" => \&NonOption, ); diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index f42f8bd2..5449dcaa 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -100,6 +100,12 @@ sub init { # This package gets special treatement: files and directories specified on # the command line may affect it. $dh{FIRSTPACKAGE}=${$dh{DOPACKAGES}}[0]; + + # If no error handling function was specified, just propigate + # errors out. + if (! exists $dh{ERROR_HANDLER} || ! defined $dh{ERROR_HANDLER}) { + $dh{ERROR_HANDLER}='exit $?'; + } } # Pass it an array containing the arguments of a shell command like would |