I'm frustrated when I try to use Devbox with a path that has a space in it. For example: if my Devbox project is in the following path:
~/src/repros/spaced path
Devbox will fail with the following error:
Error: nix print-dev-env --json "path:/Users/johnlago/src/repros/spaced path/.devbox/gen/flake": exit status 1
With DEVBOX_DEBUG=1:
...
2024/03/20 16:54:06 Running print-dev-env cmd: /nix/var/nix/profiles/default/bin/nix print-dev-env path:/Users/johnlago/src/repros/spaced path/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix
✓ Computed the Devbox environment.
Error: nix print-dev-env --json "path:/Users/johnlago/src/repros/spaced path/.devbox/gen/flake": exit status 1
2024/03/20 16:54:07 Command stderr: path '/Users/johnlago/src/repros/spaced path/path:/Users/johnlago/src/repros/spaced path/.devbox/gen/flake' does not contain a 'flake.nix', searching up
error: getting status of '/Users/johnlago/src/repros/spaced path/path:/Users/johnlago/src/repros/spaced path/.devbox/gen/flake': No such file or directory
...
What solution would you like?
As of Nix 2.19, flakes + print-dev-env support paths that are URL or percent encoded. We should adapt our command to use percent encoding, so we can support spaced paths.
What problem are you trying to solve?
I'm frustrated when I try to use Devbox with a path that has a space in it. For example: if my Devbox project is in the following path:
Devbox will fail with the following error:
With DEVBOX_DEBUG=1:
What solution would you like?
As of Nix 2.19, flakes + print-dev-env support paths that are URL or percent encoded. We should adapt our command to use percent encoding, so we can support spaced paths.
Alternatives you've considered
Not using paths with spaces