diff options
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Dgit.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 399aaad..1d713b9 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -44,7 +44,7 @@ BEGIN { server_branch server_ref stat_exists link_ltarget hashfile - fail ensuredir executable_on_path + fail ensuredir must_getcwd executable_on_path waitstatusmsg failedcmd_waitstatus failedcmd_report_cmd failedcmd runcmd cmdoutput cmdoutput_errok @@ -224,6 +224,12 @@ sub ensuredir ($) { die "mkdir $dir: $!"; } +sub must_getcwd () { + my $d = getcwd(); + defined $d or fail "getcwd failed: $!"; + return $d; +} + sub executable_on_path ($) { my ($program) = @_; return 1 if $program =~ m{/}; |