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

direnv fails on template instantiation because script file permissions are not preserved #16

Closed
cameronraysmith opened this issue Mar 1, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@cameronraysmith
Copy link
Collaborator

cameronraysmith commented Mar 1, 2025

This is a tracking issue for juspay/omnix#429

Git-tracked file permissions are not preserved on template instantiation

Steps to reproduce:

Clone the git repo and check script file permissions

❯ git clone https://github.com/sciexp/python-nix-template test-pnt
❯ cd test-pnt
❯ git checkout 7d17d0dbffe756f1804aa86fe95bf61a1867d4d3
❯ ls -alh ./scripts
.rwxr-xr-x user group 838 B Fri Feb 28 22:51:50 2025  set-git-env.sh
❯ stat -c "%a %n" scripts/set-git-env.sh
755 scripts/set-git-env.sh

Use om init to instantiate the template and check file permissions

❯ om init github:sciexp/python-nix-template/7d17d0dbffe756f1804aa86fe95bf61a1867d4d3 -o test-om-pnt
❯ cd test-om-pnt
❯ ls -alh scripts
.rw-r--r-- user group 838 B Wed Dec 31 19:00:01 1969  set-git-env.sh
❯ stat -c "%a %n" scripts/set-git-env.sh
644 scripts/set-git-env.sh

The modification date for scripts/set-git-env.sh has been set to the Unix epoch and the permissions have been changed from 755 to 644.

@cameronraysmith
Copy link
Collaborator Author

cameronraysmith commented Mar 5, 2025

This is resolved for python-nix-template by #18; though file permissions will continue to be overwritten during template instantiation as reported in the upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant