node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

fix: failure when build directory contains spaces (#65)

Open davej opened this issue 4 years ago • 3 comments

Checklist
  • [x] npm install && npm test passes
  • [ ] 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.

davej avatar Nov 25 '21 10:11 davej

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.

cclauss avatar Jun 28 '22 06:06 cclauss

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.

gjsjohnmurray avatar Sep 07 '22 22:09 gjsjohnmurray

@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

recrsn avatar Oct 06 '22 18:10 recrsn