]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei add-external: do not initialize writable store
authorEric Wong <e@80x24.org>
Thu, 25 Mar 2021 04:20:20 +0000 (06:20 +0200)
committerEric Wong <e@80x24.org>
Thu, 25 Mar 2021 17:58:58 +0000 (17:58 +0000)
There's no need to create or write lei/store when adding
an external, we just need to write to the config file.

lib/PublicInbox/LeiExternal.pm
t/lei-externals.t

index 56d6ef395ea07da5c550e808548374f47aeca80e..5e8dc71a224e854e8d547bd3671b1fee6f75e4e9 100644 (file)
@@ -144,8 +144,6 @@ sub add_external_finish {
 
 sub lei_add_external {
        my ($self, $location) = @_;
-       my $sto = $self->_lei_store(1);
-       $sto->write_prepare($self);
        my $opt = $self->{opt};
        my $mirror = $opt->{mirror} // do {
                my @fail;
index 2045691fa5c155a25e9891efdd7a5c2280c0b19c..afd90d19ad4139b56479361792ca88472773c2ff 100644 (file)
@@ -93,8 +93,7 @@ test_lei(sub {
                                \'added external');
                is($lei_out.$lei_err, '', 'no output');
        });
-       ok(-s $config_file && -e $store_dir,
-               'add-external created config + store');
+       ok(-s $config_file, 'add-external created config');
        my $lcfg = PublicInbox::Config->new($config_file);
        $cfg->each_inbox(sub {
                my ($ibx) = @_;