From: Eric Wong <e@yhbt.net>
Date: Sun, 2 Feb 2020 06:52:19 +0000 (+0000)
Subject: convert: shift @ARGV explicitly
X-Git-Tag: v1.3.0~26
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2fef8c4500fc00a15b36552c2a22da1582af033d;p=public-inbox.git

convert: shift @ARGV explicitly

Relying on implicit "@_" for shift fails with
TestCommon::_run_sub iff GetOptions modifies @ARGV.
---

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 };