enhance: git is optional

This commit is contained in:
Tienson Qin
2021-09-20 13:54:02 +08:00
parent 279a6007fe
commit 1b393d953d
2 changed files with 4 additions and 2 deletions

View File

@@ -242,7 +242,9 @@
[repo files {:keys [finish-handler chan]} file->content]
(let [write-file-f (fn [[path content]]
(let [original-content (get file->content path)]
(-> (p/let [_ (nfs/check-directory-permission! repo)]
(-> (p/let [_ (or
(util/electron?)
(nfs/check-directory-permission! repo))]
(fs/write-file! repo (config/get-repo-dir repo) path content
{:old-content original-content}))
(p/catch (fn [error]