diff options
author | 2014-08-18 10:54:13 +0530 | |
---|---|---|
committer | 2014-08-18 12:18:24 +0530 | |
commit | 76127e3a52690b47575f2f66dfc258b73c059d22 (patch) | |
tree | e2033b2cb7d5c9abd0fb2bad9303e069d8b55d2f /install | |
parent | fixing expand-deny-messages (diff) | |
download | gitolite-gentoo-76127e3a52690b47575f2f66dfc258b73c059d22.tar.gz gitolite-gentoo-76127e3a52690b47575f2f66dfc258b73c059d22.tar.bz2 gitolite-gentoo-76127e3a52690b47575f2f66dfc258b73c059d22.zip |
enforce the full path requirement in 'install'
Diffstat (limited to 'install')
-rwxr-xr-x | install | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -54,7 +54,12 @@ GetOptions( usage() if $to and $ln or $help; $ln = "$ENV{HOME}/bin" if defined($ln) and not $ln; for my $d ($ln, $to) { - if ($d and not -d $d) { + next unless $d; # ignore empty values + unless ( $d =~ m(^/) ) { + print STDERR "FATAL: please use an absolute path, not a relative path\n"; + usage(); + } + if ( not -d $d ) { print STDERR "FATAL: '$d' does not exist.\n"; usage(); } |