mirror of
https://github.com/taigrr/mg.git
synced 2026-04-02 03:28:42 -07:00
update modeperm for directory creation on clone
This commit is contained in:
@@ -52,7 +52,7 @@ var (
|
|||||||
log.Printf("attempting clone: %s\n", repo.Path)
|
log.Printf("attempting clone: %s\n", repo.Path)
|
||||||
parentPath := filepath.Dir(repo.Path)
|
parentPath := filepath.Dir(repo.Path)
|
||||||
if _, err := os.Stat(parentPath); err != nil {
|
if _, err := os.Stat(parentPath); err != nil {
|
||||||
os.MkdirAll(parentPath, os.ModeDir)
|
os.MkdirAll(parentPath, os.ModeDir|os.ModePerm)
|
||||||
}
|
}
|
||||||
_, err = git.PlainClone(repo.Path, false, &git.CloneOptions{
|
_, err = git.PlainClone(repo.Path, false, &git.CloneOptions{
|
||||||
URL: repo.Remote,
|
URL: repo.Remote,
|
||||||
|
|||||||
Reference in New Issue
Block a user