Skip to content

Commit 38626ac

Browse files
committed
chore(direnv): update .envrc
- Cleanup direnv-root file - Set filetype for vi-like editors - Format and lint according to shellcheck and shfmt
1 parent bc38e56 commit 38626ac

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.envrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# vi: ft=bash
2+
13
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
4+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
35
fi
46

5-
DEVENV_ROOT_FILE="$(mktemp)"
6-
printf %s "${PWD}" > "${DEVENV_ROOT_FILE}"
7-
if ! use flake . --override-input devenv-root "file+file://${DEVENV_ROOT_FILE}"; then
7+
devenv_root_file="$(mktemp -t devenv-root-XXXXXXXX)"
8+
printf %s "${PWD}" >"${devenv_root_file}"
9+
if ! use flake . --override-input devenv-root "file+file://${devenv_root_file}"; then
810
printf '%s\n' "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
911
fi
12+
rm "${devenv_root_file}"
13+
unset devenv_root_file

0 commit comments

Comments
 (0)