Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always set nix-direnv-reload as executable #536

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

nicknovitski
Copy link
Member

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.

Here's some discussion: docker/for-mac#5029

Other tools have run into this: pre-commit/identify#189

@nicknovitski nicknovitski force-pushed the patch-1 branch 2 times, most recently from 06a0965 to c956391 Compare November 26, 2024 06:09
direnvrc Outdated Show resolved Hide resolved
direnvrc Outdated Show resolved Hide resolved
@bbenne10
Copy link
Contributor

Calling chmod +x is idempotent, as far as I understand it. I think that is the better solution.

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.
@nicknovitski nicknovitski changed the title Test executability of nix-direnv-reload with stat Always set nix-direnv-reload as executable Nov 27, 2024
@nicknovitski nicknovitski requested a review from Mic92 November 27, 2024 04:46
@Mic92 Mic92 merged commit 0357fa0 into nix-community:master Nov 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants