Skip to content

Commit

Permalink
Don't add literal " character to filenames (#1942)
Browse files Browse the repository at this point in the history
The extra quotes caused MegaLinter to fail to find the first and last
files in the list on non-Windows platforms, because the first has a
literal double quote character prepended to it, and the last has one
appended to it. Stop passing Windows arguments verbatim to eliminate
the need for the quotes on Windows.
  • Loading branch information
Kurt-von-Laven committed Oct 22, 2022
1 parent 13cb098 commit e47338a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `oxsecurity/megalinter:beta` docker image

- Don't add literal double quote character to filenames in mega-linter-runner ([#1942](https://github.com/oxsecurity/megalinter/issues/1942)).
- Remove default npm-groovy-lint extra arguments ([#1872](https://github.com/oxsecurity/megalinter/issues/1872))

- Linter versions upgrades
Expand Down
3 changes: 1 addition & 2 deletions mega-linter-runner/lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ERROR: Docker engine has not been found on your system.
if ((options._ || []).length > 0) {
commandArgs.push(
...["-e"],
`MEGALINTER_FILES_TO_LINT="${options._.join(",")}"`
`MEGALINTER_FILES_TO_LINT=${options._.join(",")}`
);
}
commandArgs.push(dockerImage);
Expand All @@ -162,7 +162,6 @@ ERROR: Docker engine has not been found on your system.
env: Object.assign({}, process.env),
stdio: "inherit",
windowsHide: true,
windowsVerbatimArguments: true,
};
const spawnRes = spawnSync("docker", commandArgs, spawnOptions);
// Output json if requested
Expand Down

0 comments on commit e47338a

Please sign in to comment.