From b1c04f97a4f55c9347147b2eb4c5b4b4eca0928d Mon Sep 17 00:00:00 2001 From: Jason Porter Date: Wed, 24 Apr 2024 06:45:45 -0600 Subject: [PATCH] NO-ISSUE: Nix.dev: Moving PATH around so DevBox path is first (#2255) --- devbox.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devbox.json b/devbox.json index 9627108022d..9ab08fec2e4 100644 --- a/devbox.json +++ b/devbox.json @@ -17,10 +17,13 @@ "DEVBOX_COREPACK_ENABLED": "true", "GOFLAGS": "-modcacherw", "GOPATH": "$DEVBOX_PROJECT_ROOT/.devbox/gopkgs", - "PATH": "$PATH:$DEVBOX_PROJECT_ROOT/.devbox/gopkgs/bin" + "PATH": "$DEVBOX_PROJECT_ROOT/.devbox/gopkgs/bin:$PATH" }, "shell": { - "init_hook": [". $VENV_DIR/bin/activate"], + "init_hook": [ + ". $VENV_DIR/bin/activate", + "[[ $OSTYPE == 'darwin'* ]] && export PATH=$(echo $PATH | tr ':' '\n' | sed '\\|^/nix/store/|d' | paste -sd ':' -)" + ], "scripts": { "versions": [ "java --version && mvn -v && node -v && pnpm -v && go version && helm version && make -v && python --version && pip --version"