node-gyp
node-gyp copied to clipboard
fix: failure when build directory contains spaces (#65)
Checklist
- [x]
npm install && npm testpasses - [ ] tests are included
- [x] commit message follows commit guidelines
Description of change
Before this fix, if the build directory had a space in the path then it would fail because spaces were not escaped properly. Happy to add a test for this if anyone has a suggestion for how I should test this? Had a brief look through the existing tests and it wasn't clear to me how I should test this functionality.
I would strongly suggest the creation of a GitHub Action that fails because of a space in the pathname. Then we can demonstrate that this code fixes the failing test.
Getting this merged and into a new release should fix an issue seen on macOS in https://github.com/mtxr/vscode-sqltools/issues/921 where the sqlite3 package gets downloaded into a subfolder of ~/Library/Application Support/ and then has to build its binaries, uses node-gyp to do this, and fails because of the space in the path.
@davej The node-gyp project simply vendors the gyp-next so maybe we should raise a PR against https://github.com/nodejs/gyp-next/blob/main/pylib/gyp/generator/make.py