diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-06-24 17:28:43 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-06-24 17:28:43 +0900 |
commit | d3edd9c1a10eb7c648ae16e86bc924618a27c527 (patch) | |
tree | 1249798ab590d9e87f84f17eb80baaf9e728ac2a | |
parent | f228a14b5df93a515b8f72fd30c6d3578ae28b94 (diff) |
use getcwd instead of PWD env var
In the rc shell, the PWD env var cannot be relied upon.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | lib/DhMakeELPA/Command/make.pm | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 27e1e09..ea09b69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ dh-make-elpa (0.2.1) UNRELEASED; urgency=medium references. Previously, in the case of a single binary package, it was inserting a string rather than a list reference. + * Use getcwd() rather than relying on the PWD env var. + Thanks to Dmitry Bogatov for reporting the problem, which occurs with + the rc interactive shell. -- Sean Whitton <spwhitton@spwhitton.name> Sun, 08 May 2016 15:06:10 -0700 diff --git a/lib/DhMakeELPA/Command/make.pm b/lib/DhMakeELPA/Command/make.pm index 2a1673f..d22ca0e 100644 --- a/lib/DhMakeELPA/Command/make.pm +++ b/lib/DhMakeELPA/Command/make.pm @@ -8,6 +8,7 @@ use Debian::Control; use File::Spec::Functions qw(catfile); use Email::Date::Format qw(email_date); use File::Grep qw(fgrep); +use Cwd; use base 'DhMakeELPA::Command::Packaging'; @@ -15,7 +16,7 @@ sub execute { my $self = shift; # extract basic information from package - $self->main_dir($ENV{'PWD'}); + $self->main_dir(getcwd()); $self->extract_basic; # initial sanity check |