Page MenuHomePhabricator

Do not escape binary paths in external linters

Authored by BYK on Oct 8 2015, 6:14 PM.
Referenced Files
Unknown Object (File)
Sat, Aug 6, 5:43 AM
Unknown Object (File)
Wed, Aug 3, 6:17 AM
Unknown Object (File)
Sun, Jul 24, 8:57 PM
Unknown Object (File)
Jul 14 2022, 8:01 AM
Unknown Object (File)
Jul 14 2022, 4:11 AM
Unknown Object (File)
Jul 4 2022, 10:29 AM
Unknown Object (File)
Jun 28 2022, 2:01 PM
Unknown Object (File)
Jun 25 2022, 10:18 AM


Group Reviewers
Blessed Reviewers

When using external linters, such as puppet-lint the command arc produces is like the following: `"puppet-lint" "something" "some other
thing"`. Note the quotes around the binary name, which breaks the command (at least on Windows). This patch prevents arcanist from escaping the binary

Test Plan

Try arc lint on a project making use of an ExternalLinter on a Windows machine and make sure you see no errors with the patch. Also try
it on a Linux machine and make sure you see no errors on a Linux machine either.

Diff Detail

rARC Arcanist
Lint Passed
Test Failures
Build Status
Buildable 8208
Build 9385: arc lint + arc unit

Event Timeline

BYK retitled this revision from to Do not escape binary paths in external linters.
BYK updated this object.
BYK edited the test plan for this revision. (Show Details)
BYK added a reviewer: epriestley.

This is a "does this really work?" sort of diff. Will make it proper after some feedback. Thanks! :)

BYK edited edge metadata.
  • Fix some tests

This doesn't work: binaries may have spaces in their names. See T8298.

See D11396 for a variant of this. See also T6966. But I don't intend to accept any changes here which are not along the pathway described in T8298 -- that is, I want to build toward a working Windows command escaping environment, not pile more hacks on the broken one we have now.

Oh, thanks a lot for the pointers. I'll see how I can help with those.