From bd2dff9301db686ed013e4d8cf6319fe0b06e5e5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Oct 2023 23:38:07 +0000 Subject: init: drop extraneous `+' It's actually valid Perl syntax, but still confusing to look at. Fixes: add90b9504f4 ("support -C (chdir) for most non-daemon commands") --- script/public-inbox-init | 2 +- t/init.t | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/script/public-inbox-init b/script/public-inbox-init index 33bee310..b3e94faf 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -60,7 +60,7 @@ my $inboxdir = shift @ARGV or $usage_cb->(); my $http_url = shift @ARGV or $usage_cb->(); my (@address) = @ARGV; @address or $usage_cb->(); -+PublicInbox::Admin::do_chdir(\@chdir); +PublicInbox::Admin::do_chdir(\@chdir); @c_extra = map { my ($k, $v) = split(/=/, $_, 2); diff --git a/t/init.t b/t/init.t index abe3a372..177c22b6 100644 --- a/t/init.t +++ b/t/init.t @@ -216,6 +216,13 @@ SKIP: { is($n, 13, 'V1 NNTP article numbers skipped via --skip-artnum'); } +{ + my $cmd = [ qw(-init -C), "$tmpdir", qw(chdirlist chdirlist), + qw(http://example.com/chdirlist chdirlist@example.com)]; + ok(run_script($cmd), '-init with -C (chdir)'); + ok(-d "$tmpdir/chdirlist", '-C processed correctly'); +} + done_testing(); sub read_indexlevel { -- cgit v1.2.3-24-ge0c7