You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Briefly, direnv fails after instantiating a template with om init because the template relies on an executable script and the template instantiation doesn't seem to preserve the permissions of the files from the template.
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.
Briefly, direnv fails after instantiating a template with
om init
because the template relies on an executable script and the template instantiation doesn't seem to preserve the permissions of the files from the template.Git-tracked file permissions are not preserved on template instantiation
Steps to reproduce:
Clone the git repo and check script file permissions
Use
om init
to instantiate the template and check file permissionsThe 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.See ASCII cast from #425 and discussion in #424, #424 (comment) for additional context.
The text was updated successfully, but these errors were encountered: