fix: EINVAL when spawning cmd files on Windows (#41893)
fix: EINVAL when spawning on Windows
This commit is contained in:
parent
67ba30402b
commit
c4aeb17245
5 changed files with 12 additions and 6 deletions
|
@ -75,7 +75,8 @@ function spawnAndCheckExitCode (cmd, args, opts) {
|
|||
|
||||
function cpplint (args) {
|
||||
args.unshift(`--root=${SOURCE_ROOT}`);
|
||||
const result = childProcess.spawnSync(IS_WINDOWS ? 'cpplint.bat' : 'cpplint.py', args, { encoding: 'utf8', shell: true });
|
||||
const cmd = IS_WINDOWS ? 'cpplint.bat' : 'cpplint.py';
|
||||
const result = childProcess.spawnSync(cmd, args, { encoding: 'utf8', shell: true });
|
||||
// cpplint.py writes EVERYTHING to stderr, including status messages
|
||||
if (result.stderr) {
|
||||
for (const line of result.stderr.split(/[\r\n]+/)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue