| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Before this change, Makefile would sometimes use quotation marks when
expanding the NODE Make variable and sometimes would not use quotation
marks when expanding the NODE Make variable. This change makes it so
that the Makefile never uses quotation marks when expanding the NODE
variable.
Line 82 of the Makefile sets the NODE variable to this:
NODE ?= "$(PWD)/$(NODE_EXE)"
Since there are already quotation marks embedded in the value of the
NODE variable, we don’t need to add additional quotes when expanding the
variable. In fact, adding quotes can cause issues. For example, before
this change, line 97 of the Makefile said this:
if [ -x "$(NODE)" ] && [ -e "$(NODE)" ]; then \
If you tried to run “make test-only” and the path your copy of the
Node.js source code contained spaces, then that line would expand to
something like this:
if [ -x ""/Path that contains spaces/node"" ] && [ -e ""/Path that contains spaces/node"" ]; then \
The shell would then fail to run that command because of the improper
quoting.
The Makefile contains two variable: NODE and run-npm-ci. Here’s the line that sets the NODE variable: NODE ?= "$(PWD)/$(NODE_EXE)" The value of the NODE variable contains quotation marks just in case $(PWD) contains spaces. Before this change, here’s how the run-npm-ci variable was set: run-npm-ci = $(PWD)/$(NPM) ci The value of the run-npm-ci variable does not contain quotation marks. $(run-npm-ci) is supposed expand into two words when interpreted by a shell, but if $(PWD) contained spaces, then it would expand into more than 2 words. This change adds quotation marks to the value of run-npm-ci. This change makes the Makefile more consistent and helps make sure that $(run-npm-ci) does the right thing, even if $(PWD) contains spaces.
|
This pull request has been marked as stale due to 90 days of inactivity. |
Sorry, something went wrong.
|
Now that #60511 has been merged, this pull request is obsolete. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The “Building Node.js” guide says:
This pull request contains a few fixes that are directed at that problem. I still haven’t been able to successfully build and test Node.js while it’s stored in a path that contains spaces, but the changes in this pull request have gotten me closer to being able to do that.
Unfortunately, in order to test one of the commits in this pull request, a vendored dependency of a vendored dependency of a vendored dependency needs to be patched. I’m going to mark this pull request as a draft until the following has happened: