diff options
author | Eric Wong <e@80x24.org> | 2015-09-06 07:15:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-06 09:26:31 +0000 |
commit | 2a2973d2774cb104d0a5a06e2febad8db10b39eb (patch) | |
tree | 17ffc520c4fe601a6ab5f2ec794e6f5caee8a65d /public-inbox-init | |
parent | f76f265a851944b5dedcc3be5f3b5224b6ebda89 (diff) | |
download | public-inbox-2a2973d2774cb104d0a5a06e2febad8db10b39eb.tar.gz |
We actually have no business expanding (e.g. translating ~ to $HOME) paths from the command-line argument, the shell does that. However, we need to make the path absolute instead.
Diffstat (limited to 'public-inbox-init')
-rwxr-xr-x | public-inbox-init | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public-inbox-init b/public-inbox-init index 8847eb68..d6a63822 100755 --- a/public-inbox-init +++ b/public-inbox-init @@ -8,7 +8,7 @@ use PublicInbox::Config; use File::Temp qw/tempfile/; use File::Basename qw/dirname/; use File::Path qw/mkpath/; -use File::Path::Expand qw/expand_filename/; +use Cwd qw/abs_path/; sub x { system(@_) and die join(' ', @_). " failed: $?\n" } sub usage { print STDERR "Usage: $usage\n"; exit 1 } @@ -59,7 +59,7 @@ close $fh or die "failed to close $filename: $!\n"; my $pfx = "publicinbox.$name"; my @x = (qw/git config/, "--file=$filename"); -$git_dir = expand_filename($git_dir); +$git_dir = abs_path($git_dir); x(qw(git init -q --bare), $git_dir); foreach my $addr (@address) { next if $seen{lc($addr)}; |