summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit8
1 files changed, 7 insertions, 1 deletions
diff --git a/dgit b/dgit
index 6369856..8661339 100755
--- a/dgit
+++ b/dgit
@@ -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;