-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make demo and make local fails if CURDIR has spaces in it #235
Comments
BTW, if folks want to go with the approach of adding quotes to the use of $(CURDIR) I can create a PR for that change. |
At today's tech call I proposed making a PR that will wrap the use of |
@DonRichards (and others) I have been experimenting with Makefile syntax (I had never used Makefiles this complex before), and wondered what you (all) thought of something. my original plan was to just wrap the use of $(CURDIR) in double quotes from this...
to this...
and I wondered how would you want to handle lines like 332 in the Makefile... Lines 327 to 334 in 3aa6e1f
There could be a simple way to handle adding quotes to a snippet that is already in double quotes, but I could not figure it out yet. For now I took the approach of creating a "target-specific variable" called Lines 327 to 335 in 431976d
I was then able to partially build demo with the changes above while using a path (and thus $CURDIR) to the isle-dc repo with spaces. For example, the demo containers were created. Though I got errors when the makefile tried to call the In this case the error was...
Here is the relevant code... The problem now is that the drupal-public-files-import target's prerequisite is not being matched because of the spaces in the path. It is being seen as multiple files, instead of SRC pointing to a single file. Lines 226 to 231 in 3aa6e1f
I am not sure how to fix this, and it will probably take someone with more experience with Makefiles than me. I am able to wrap Thoughts? Thanks in advance. P.S. In the short term I can create updates to the README and official docs that the path to isle-dc currently cannot have spaces. |
I believe this is resolved by #237 ? |
In an attempt to be thorough I want to paste a comment that @misilot put in PR #237 "... Based on the info above, If we are running into a limitation of Make, to have spaces in its path, then should I/we revert the parts of my PR #237 that tried to fix this issues incompletely? Then just keep the code that @DonRichards wrote that just stops the Makefile execution with an error if a space is detected in the path? That way we end up with less changes to the resulting Makefile? |
I will close this ticket. @DonRichards code provides a pretty clear error message for folks that fall into this situation. @misilot thanks for adding more info to this issue. |
I believe that if you have spaces in the path for the isle-dc repo on your system,
make demo
andmake local
will fail.I was using a path similar to this...
/home/yamil/isle tests/isle-dc
This of course leads to Make setting the CURDIR to a path with spaces, and then also leads to the makefile generate-secrets target to run commands that fails since it gets parsed as...
(I was able to see how the commands was parsed by running
make generate-secrets -n
)On macOS Big Sur and Mojave I got this not too obvious error when running
make demo
ormake local
...Not sure what is best:
If folks decide to not change the Makefile code I can create a documentation PR to add a note/tip/warning about not having paths with spaces in the README and/or in the official docs.
For example, in this page that covers Installing ISLE Docker Compose and/or the section for Installing a Demo Server
Thoughts?
Thanks in advance.
The text was updated successfully, but these errors were encountered: