Seems like the code assumes that the file path for mkcertPrebuilt is a valid file system path. It's not always the case.
Sometimes (as is the case in #312) the Node is installed in a directory where there's a space in the directory name. Such paths with a space in-between will break the script, if not escaped properly.
Description of the Change
Seems like the code assumes that the file path for
mkcertPrebuilt
is a valid file system path. It's not always the case.Sometimes (as is the case in #312) the Node is installed in a directory where there's a space in the directory name. Such paths with a space in-between will break the script, if not escaped properly.
As it's rightly pointed out https://github.com/10up/wp-local-docker-v2/issues/312#issuecomment-1325528607.
I've escaped the shell binary path with double quotes so that unexpected space characters in the file path doesn't break the script.
Closes #312
How to test the Change
Not sure. Haven't followed any testing strategy here. But happy to follow any guidance here.
Changelog Entry
Credits
Props ...
Checklist: