From 8a942750804c799bb6eb7139e27b8447b1c2b36a Mon Sep 17 00:00:00 2001 From: Nick Novitski Date: Mon, 25 Nov 2024 18:25:34 -0800 Subject: [PATCH] Always set nix-direnv-reload as executable I am not sure why, but on docker bind mounts using virtiofs and gcsFuse, `-x` is always true for a file which exists. This means that, before this commit was merged, when using nix-direnv in manual mode on a devcontainer with docker desktop on mac, `nix-direnv-reload` would be created and then not set as executable, and if they tried to run it users would see an error like `bad interpreter: Permission denied`. After this commit is merged, these scenarios work. --- direnvrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/direnvrc b/direnvrc index ddac0f5..c3b7268 100644 --- a/direnvrc +++ b/direnvrc @@ -140,9 +140,7 @@ touch "$PWD/.envrc" touch -r "$PWD/.envrc" "${layout_dir}"/*.rc EOF - if [[ ! -x "${layout_dir}/bin/nix-direnv-reload" ]]; then - chmod +x "${layout_dir}/bin/nix-direnv-reload" - fi + chmod +x "${layout_dir}/bin/nix-direnv-reload" PATH_add "${layout_dir}/bin" }