I am creating a new template for my projects. The root folder has a script with executable permissions. When creating a dummy application, I am referring to the template using local/root coordinates. The script is created correctly, however it doesn't have the executable permission on it. All this is on WSL2 Linux.
• Is it correct for me to expect the script file to be copied over while retaining the executable permission?
• Is there a way for me to mark the script executable after the dummy app is created? Like some kind of post creation hook script?
I implemented the workaround. Thank you! I will keep an eye on the ask thread. 👍
I scrolled up and saw this has already been reported here - https://clojurians.slack.com/archives/C019ZQSPYG6/p1634833518001900 ... @carsten.behring were you able to create the ticket? please share if you did. thanks.
@seancorfield Looking at the source for deps-new , it seems to be primarily using b/copy-dir to copy files from root to the created app. From https://github.com/amithgeorge/tools-build-executable-file-copy-bug, b/copy-dir is able to copy the script correctly with the executable permission set. For reference this is https://github.com/amithgeorge/deps-new-app-template. It would help if you could clarify what should I change in my test repo to reproduce the issue.
The only copy-file operations should be on the two explicitly named files lib.clj and lib_test.clj -- everything else should copied with copy-dir. Based on your test, I would therefore expect to get x perms copied from template to temp dir to target dir. Could you create an issue on deps-new pointing to your repo and I can take a look? I'm wondering if the x perms are lost when the template is checked out by t.d.a perhaps?
Issue created - https://github.com/seancorfield/deps-new/issues/22 .
Thanks @amithgeorge -- I probably won't get to it until the weekend but at least now I have a repro and won't forget it 🙂
Figured it out while I was watching Drag Race -- created an "ask" for tools.build and updated the issue with a workaround for now.