about summary refs log tree commit homepage
path: root/t/plack.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-04 11:13:47 +0000
committerEric Wong <e@80x24.org>2019-11-04 18:33:25 +0000
commit600e3a464823b3f460a80723a8ea3525fe841285 (patch)
tree56203f59c6b12ad4af1f7d3e5cde36d06356e4b2 /t/plack.t
parentb5318c127af37e330e4ba059817425a596a27647 (diff)
downloadpublic-inbox-600e3a464823b3f460a80723a8ea3525fe841285.tar.gz
It's possible (but unlikely) a user will put spaces in TMPDIR
and cause File::Temp::tempdir() to return a temporary directory
with spaces in the filename, making it unsafe for shell
expansion.

PublicInbox::Git didn't exist when t/mda.t was written, and
I just forgot about PublicInbox::Git->qx for t/plack.t :x
Diffstat (limited to 't/plack.t')
-rw-r--r--t/plack.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/plack.t b/t/plack.t
index 7e65ad74..9308813f 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -54,9 +54,9 @@ EOF
                 my $im = PublicInbox::Import->new($git, 'test', $addr);
                 $im->add($mime);
                 $im->done;
-                my $rev = `git --git-dir="$maindir" rev-list HEAD`;
+                my $rev = $git->qx(qw(rev-list HEAD));
                 like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
-                @ls = `git --git-dir="$maindir" ls-tree -r --name-only HEAD`;
+                @ls = $git->qx(qw(ls-tree -r --name-only HEAD));
                 chomp @ls;
         }
         my $app = eval {