about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-22 05:44:16 -0400
committerEric Wong <e@80x24.org>2021-04-22 17:05:52 -0400
commit6840164c54895eee776f95ceaeae0fccab0880aa (patch)
tree9064365b65f4f5d3f4818c87329fd79d866dffed /script
parent3a6e13b7f3cf04b9a3dd0fdd3ed4d96a05e31e9f (diff)
downloadpublic-inbox-6840164c54895eee776f95ceaeae0fccab0880aa.tar.gz
We'll support this mode of operation for now to quiet down
testing of oneshot mode where the daemon doesn't persist.
Diffstat (limited to 'script')
-rwxr-xr-xscript/lei3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/lei b/script/lei
index 56e9d299..db302422 100755
--- a/script/lei
+++ b/script/lei
@@ -62,6 +62,7 @@ my $exec_cmd = sub {
 if ($send_cmd && eval {
         my $path = do {
                 my $runtime_dir = ($ENV{XDG_RUNTIME_DIR} // '') . '/lei';
+                die \0 if $runtime_dir eq '/dev/null/lei'; # oneshot forced
                 if ($runtime_dir eq '/lei') {
                         require File::Spec;
                         $runtime_dir = File::Spec->tmpdir."/lei-$<";
@@ -131,7 +132,7 @@ Falling back to (slow) one-shot mode
         }
         exit($x_it_code >> 8);
 } else { # for systems lacking Socket::MsgHdr or Inline::C
-        warn $@ if $@;
+        warn $@ if $@ && !ref($@);
         require PublicInbox::LEI;
         PublicInbox::LEI::oneshot(__PACKAGE__);
 }