Fork me on GitHub
#deps-new
<
2021-12-02
>
amithgeorge10:12:06

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?

amithgeorge10:12:28

I scrolled up and saw this has already been reported here - https://clojurians.slack.com/archives/C019ZQSPYG6/p1634833518001900 ... @U7CAHM72M were you able to create the ticket? please share if you did. thanks.

amithgeorge11:12:44

@U04V70XH6 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.

seancorfield17:12:18

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?

šŸ‘ 1
seancorfield05:12:39

Thanks @U0A5B1LJU -- I probably won't get to it until the weekend but at least now I have a repro and won't forget it šŸ™‚

simple_smile 1
šŸ™ 1
seancorfield06:12:14

Figured it out while I was watching Drag Race -- created an "ask" for tools.build and updated the issue with a workaround for now.

amithgeorge10:12:10

I implemented the workaround. Thank you! I will keep an eye on the ask thread. :thumbsup: