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)
Wed, Nov 20, 8:28 PM
Unknown Object (File)
Wed, Nov 20, 6:20 PM
Unknown Object (File)
Wed, Nov 20, 10:05 AM
Unknown Object (File)
Wed, Nov 20, 10:05 AM
Unknown Object (File)
Sun, Nov 17, 12:22 PM
Unknown Object (File)
Sat, Nov 16, 4:08 AM
Unknown Object (File)
Fri, Oct 25, 6:46 PM
Unknown Object (File)
Oct 24 2024, 4:58 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.