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
F14002413: D14246.id.diff
Fri, Oct 25, 6:46 PM
F13999744: D14246.diff
Thu, Oct 24, 4:58 PM
F13969760: D14246.id.diff
Thu, Oct 17, 3:43 AM
F13969513: D14246.id34396.diff
Thu, Oct 17, 2:56 AM
F13969510: D14246.id34395.diff
Thu, Oct 17, 2:56 AM
Unknown Object (File)
Sun, Oct 13, 7:10 PM
Unknown Object (File)
Oct 7 2024, 1:36 AM
Unknown Object (File)
Oct 2 2024, 2:07 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.