about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-10 23:53:46 +0000
committerEric Wong <e@80x24.org>2019-06-14 16:26:36 +0000
commit128dea6f0b74c8e2b97849d56e30ff993a6037e3 (patch)
treedcd358ba03c5f7d780ed8aa194537162fe668139 /script
parent4bb34fb8f29530f6bda5f0d563a74f6289ac312d (diff)
downloadpublic-inbox-128dea6f0b74c8e2b97849d56e30ff993a6037e3.tar.gz
The eval was unnecessary, and $0 can't be "--".
Tested with /bin/sh on FreeBSD 11.2
Diffstat (limited to 'script')
-rwxr-xr-xscript/public-inbox-edit2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/public-inbox-edit b/script/public-inbox-edit
index 2e2c7616..6884fd0c 100755
--- a/script/public-inbox-edit
+++ b/script/public-inbox-edit
@@ -138,7 +138,7 @@ foreach my $to_edit (values %$found) {
 
         # run the editor, respecting spaces/quote
 retry_edit:
-        if (system(qw(sh -c), qq(eval "$editor" '"\$@"'), '--', $edit_fn)) {
+        if (system(qw(sh -c), $editor.' "$@"', $editor, $edit_fn)) {
                 if (!(-t STDIN) && !$opt->{force}) {
                         die "E: $editor failed: $?\n";
                 }