File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 1- ./scripts/set-git-env.sh
2-
31if has nix; then
42 watch_file \
53 nix/modules/* .nix \
@@ -9,9 +7,25 @@ if has nix; then
97 then
108 echo " nix flake could not be built; update flake.nix and run direnv allow/reload" >&2
119 fi
12- printf " \nrun \` nix flake update --impure && nix flake check --impure\` to update the flake lockfile."
13- printf " \nuse \` direnv revoke\` to unload the dev environment or \` direnv allow\` to reload it.\n\n"
10+
11+
12+ printf " \nrun \` nix flake update --impure && nix flake check --impure\` to update the flake lockfile.\n"
13+ printf " use \` direnv revoke\` to unload the dev environment or \` direnv allow\` to reload it.\n"
1414else
15+ # The equivalent nix shell application set-git-env is now run automatically
16+ # via shellHook and the variables are already exported to the environment.
17+ # Fallback to the local script if Nix isn't available or disable if it's not
18+ # executable.
19+ if [ -f ./scripts/set-git-env.sh ]; then
20+ if [ -x ./scripts/set-git-env.sh ]; then
21+ ./scripts/set-git-env.sh
22+ else
23+ echo " Warning: scripts/set-git-env.sh exists but is not executable. Run 'chmod +x ./scripts/set-git-env.sh' to make it executable."
24+ fi
25+ else
26+ echo " Warning: scripts/set-git-env.sh not found and Nix not available"
27+ fi
28+
1529 printf " \nNix is not installed or not available in your PATH. You can either:\n"
1630 printf " 1. Run \` make bootstrap\` from the Makefile to set up nix\n"
1731 printf " 2. Visit https://nix.dev to find instructions on installing nix\n\n"
You can’t perform that action at this time.
0 commit comments