diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-03 17:09:43 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-03 17:09:43 +0100 |
commit | a687e0b6a3ac727f4b40f042265093699717251e (patch) | |
tree | 3af59d6ce44446b0ca6f901ea63ff90e99bd54bb /dgit | |
parent | 87706b323ead6f88ecbcef49249d811989184a2d (diff) |
getcwd: Introduce must_getcwd using getcwd rather than cmdoutput
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -623,6 +623,12 @@ sub git_get_ref ($) { } } +sub must_getcwd () { + my $d = getcwd(); + defined $d or fail "getcwd failed: $!"; + return $d; +} + our %rmad; sub archive_query ($) { @@ -1915,7 +1921,7 @@ sub build_source { runcmd_ordryrun_local (@dpkgbuildpackage, qw(-us -uc -S)), changesopts(); } else { - my $pwd = cmdoutput qw(env - pwd); + my $pwd = must_getcwd(); my $leafdir = basename $pwd; changedir ".."; runcmd_ordryrun_local @dpkgsource, qw(-b --), $leafdir; |