diff --git a/src/nextjournal/garden_cli.clj b/src/nextjournal/garden_cli.clj index 0604df0..3395b09 100755 --- a/src/nextjournal/garden_cli.clj +++ b/src/nextjournal/garden_cli.clj @@ -82,8 +82,11 @@ (fs/delete-if-exists "garden.edn")) (defn template [target-dir] - (fs/copy-tree (fs/path (io/resource "project-template")) target-dir {:replace-existing true - :posix-file-permissions "rwxr-xr-x"})) + (let [perms "rwxr-xr-x"] + (fs/copy-tree (fs/path (io/resource "project-template")) target-dir {:replace-existing true + :posix-file-permissions perms}) + (fs/walk-file-tree target-dir {:pre-visit-dir (fn [dir _] (fs/set-posix-file-permissions dir perms) :continue) + :visit-file (fn [file _] (fs/set-posix-file-permissions file perms) :continue)}))) (defn project-dir [] (fs/cwd))