diff options
author | Eric Wong <e@yhbt.net> | 2020-02-02 06:52:19 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-02-02 17:29:56 +0000 |
commit | 2fef8c4500fc00a15b36552c2a22da1582af033d (patch) | |
tree | 41ab5fc64c440e9f705f867c914ef00676957505 | |
parent | 058cc69698d2c0c839043cfa9b868d37c718a9f4 (diff) | |
download | public-inbox-2fef8c4500fc00a15b36552c2a22da1582af033d.tar.gz |
Relying on implicit "@_" for shift fails with TestCommon::_run_sub iff GetOptions modifies @ARGV.
-rwxr-xr-x | script/public-inbox-convert | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/public-inbox-convert b/script/public-inbox-convert index acecf3d5..281313e0 100755 --- a/script/public-inbox-convert +++ b/script/public-inbox-convert @@ -19,8 +19,8 @@ my %opts = ( '--index!' => \$index, ); GetOptions(%opts) or die "bad command-line args\n$usage"; -my $old_dir = shift or die $usage; -my $new_dir = shift or die $usage; +my $old_dir = shift(@ARGV) or die $usage; +my $new_dir = shift(@ARGV) or die $usage; die "$new_dir exists\n" if -d $new_dir; die "$old_dir not a directory\n" unless -d $old_dir; my $config = eval { PublicInbox::Config->new }; |