-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Labels
Description
What happened?
TLDR
This line of code is not doing proper whitespace escaping on the value of d.projectDir(). The issue may also be fixable by updating shellgen.ScriptPath(), but you all will know better than I.
Description
devbox shellenv --init-hook --install --no-refresh-alias breaks when the project directory contains whitespace.
I specifically encounter this when I am running devbox generate direnv --print-envrc, which appears to be calling out to the above command on my system.
The reason this ultimately fails is because this script produces this line following all of the exports:
. /Users/andrewmonroe/Documents/10-19 Workspace/10 App/canarytech_dev/.devbox/gen/scripts/.hooks.sh;Which naturally leads to this error when the output code is executed:
/bin/bash:195: /Users/andrewmonroe/Documents/10-19: No such file or directorySteps to reproduce
- Make a project within a directory whose path includes whitespace.
- Run
devbox shellenv --init-hook --install --no-refresh-alias. - See that the attempt to invoke the
.hooks.shfile will not include whitespace-escaping.
Command
shellenv
devbox.json
No response
Devbox version
0.13.5
Nix version
No response
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
No response