fix: make lint run on Windows in PowerShell
This commit is contained in:
Родитель
878c5b663d
Коммит
4017f3faa7
12
package.json
12
package.json
|
@ -44,19 +44,19 @@
|
|||
"bump-version": "./script/bump-version.py",
|
||||
"check-tls": "python ./script/tls.py",
|
||||
"clang-format": "find atom/ brightray/ chromium_src/ -iname *.h -o -iname *.cc -o -iname *.mm | xargs clang-format -i",
|
||||
"lint": "./script/lint.js && npm run lint:clang-format && npm run lint:docs",
|
||||
"lint:js": "./script/lint.js --js",
|
||||
"lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs",
|
||||
"lint:js": ".node /script/lint.js --js",
|
||||
"lint:clang-format": "python script/run-clang-format.py -r -c atom/ chromium_src/ brightray/ || (echo \"\\nCode not formatted correctly.\" && exit 1)",
|
||||
"lint:cpp": "./script/lint.js --cc",
|
||||
"lint:py": "./script/lint.js --py",
|
||||
"lint:gn": "./script/lint.js --gn",
|
||||
"lint:cpp": "node ./script/lint.js --cc",
|
||||
"lint:py": "node ./script/lint.js --py",
|
||||
"lint:gn": "node ./script/lint.js --gn",
|
||||
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links",
|
||||
"lint:docs-relative-links": "python ./script/check-relative-doc-links.py",
|
||||
"lint:js-in-markdown": "standard-markdown docs",
|
||||
"create-api-json": "electron-docs-linter docs --outfile=electron-api.json",
|
||||
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --in=electron-api.json --out=electron.d.ts",
|
||||
"preinstall": "node -e 'process.exit(0)'",
|
||||
"precommit": "python script/run-clang-format.py -r -c atom/ chromium_src/ brightray/ && ./script/lint.js -c && remark docs -qf || (echo \"Code not formatted correctly.\" && exit 1)",
|
||||
"precommit": "python script/run-clang-format.py -r -c atom/ chromium_src/ brightray/ && node ./script/lint.js -c && remark docs -qf || (echo \"Code not formatted correctly.\" && exit 1)",
|
||||
"prepack": "check-for-leaks",
|
||||
"prepush": "check-for-leaks",
|
||||
"repl": "node ./script/start.js --interactive",
|
||||
|
|
|
@ -94,7 +94,7 @@ const LINTERS = [ {
|
|||
const allOk = filenames.map(filename => {
|
||||
const args = ['format', filename]
|
||||
if (!opts.fix) args.push('--dry-run')
|
||||
const result = childProcess.spawnSync('gn', args, { stdio: 'inherit' })
|
||||
const result = childProcess.spawnSync('gn', args, { stdio: 'inherit', shell: true })
|
||||
if (result.status === 0) {
|
||||
return true
|
||||
} else if (result.status === 2) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче