diff --git a/.gitignore b/.gitignore index c5b8bc871..b1233109f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /benchmark/build /benchmark/src /test/addon_build/addons +/.vscode diff --git a/tools/clang-format.js b/tools/clang-format.js index b76d89bda..e4bb4f52e 100644 --- a/tools/clang-format.js +++ b/tools/clang-format.js @@ -20,7 +20,10 @@ function main (args) { } const clangFormatPath = path.dirname(require.resolve('clang-format')); - const options = ['--binary=node_modules/.bin/clang-format', '--style=file']; + const binary = process.platform === 'win32' + ? 'node_modules\\.bin\\clang-format.cmd' + : 'node_modules/.bin/clang-format'; + const options = ['--binary=' + binary, '--style=file']; if (fix) { options.push(FORMAT_START); } else {