Open evanleck opened 7 months ago
Probably worth noting that I’m using fish shell.
@evanleck which version of fish shell are you using?
@savil fish 3.7.1 and direnv 2.34.0
Hey @evanleck, I've been trying to reproduce this but I can't get the error to replicate with Fish + Direnv. Can you try the following:
devbox version update
.devbox
directory, then regenerate them using devbox shell
.If those don't fix your issue, can you share the contents of the file at devbox-node-repro/.devbox/gen/scripts/.raw-hooks.sh
@Lagoja thanks for looking into the issue.
Unfortunately, that didn't seem to fix the issue. The contents of .raw-hooks.sh
is:
test -z $DEVBOX_COREPACK_ENABLED || corepack enable --install-directory "/Users/evan/Code/devbox-node-repro/.devbox/virtenv/nodejs/corepack-bin/"
test -z $DEVBOX_COREPACK_ENABLED || export PATH="/Users/evan/Code/devbox-node-repro/.devbox/virtenv/nodejs/corepack-bin/:$PATH"
I don't see DEVBOX_COREPACK_ENABLED
anywhere in the output of env
if that's of any help.
FWIW changing the contents of .raw-hooks
to use test -v
seems to fix the issue, though I'm not 100% sure it's functionally equivalent. Worth noting, test -v
was introduced in bash 4.2, so this won't work on versions prior to that.
test -v DEVBOX_COREPACK_ENABLED || corepack enable --install-directory "/Users/evan/Code/devbox-node-repro/.devbox/virtenv/nodejs/corepack-bin/"
test -v DEVBOX_COREPACK_ENABLED || export PATH="/Users/evan/Code/devbox-node-repro/.devbox/virtenv/nodejs/corepack-bin/:$PATH"
I have exact same issue, with devbox 0.10.9 and zsh 5.9 (NixOS from the current release-24.05 tag). The test -v
trick works (thanks a lot for the advice!), and so does wrapping the test
s with set +u
/set -u
.
What happened?
I installed
nodejs@20
via devbox and added direnv withdevbox generate direnv
and now when Icd
into that directory I get this error:Steps to reproduce
Command
add, generate
devbox.json
Devbox version
0.10.1
Nix version
nix (Nix) 2.20.5
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
No response