Page MenuHomePhabricator

Do not escape binary paths in external linters
AbandonedPublic

Authored by BYK on Oct 8 2015, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 7:41 PM
Unknown Object (File)
Fri, Apr 19, 3:43 PM
Unknown Object (File)
Thu, Apr 11, 7:59 AM
Unknown Object (File)
Mon, Apr 8, 6:20 PM
Unknown Object (File)
Sat, Mar 30, 12:40 AM
Unknown Object (File)
Mar 9 2024, 8:32 PM
Unknown Object (File)
Mar 4 2024, 4:37 PM
Unknown Object (File)
Mar 4 2024, 4:37 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

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
command.

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

Repository
rARC Arcanist
Branch
double-escapes
Lint
Lint Passed
Unit
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.