Permalink
Browse files

fix: broken -l and -L option (rt71417)

  • Loading branch information...
1 parent 2c06abc commit b255a9d8f711943c741028f2ee5831bb0cf33ead @xaicron committed Oct 3, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/App/pmuninstall.pm
@@ -267,7 +267,7 @@ sub fixup_packlist {
sub is_local_lib {
my ($self, $file) = @_;
- return unless exists $INC{'local/lib.pm'};
+ return unless $self->{local_lib};
my $local_lib_base = quotemeta File::Spec->catfile(Cwd::realpath($self->{local_lib}));
$file = File::Spec->catfile($file);
@@ -291,6 +291,12 @@ sub setup_local_lib {
my $self = shift;
return unless $self->{local_lib};
+ unless (-d $self->{local_lib}) {
+ $self->puts(colored ['red'], "! $self->{local_lib} is no such directory");
+ exit 1;
+ }
+
+ require Cwd;
local $SIG{__WARN__} = sub { }; # catch 'Attempting to write ...'
$self->{inc} = [
map { Cwd::realpath($_) }

0 comments on commit b255a9d

Please sign in to comment.