[_]
This commit is contained in:
parent
e2b98ba745
commit
fbdce4cc5b
1 changed files with 6 additions and 1 deletions
|
|
@ -229,7 +229,6 @@ func makeDirs(root string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeInit(root string) error {
|
func makeInit(root string) error {
|
||||||
files := data.AssetNames()
|
|
||||||
|
|
||||||
// if the app.json exist ignore
|
// if the app.json exist ignore
|
||||||
file := filepath.Join("app.json")
|
file := filepath.Join("app.json")
|
||||||
|
|
@ -237,6 +236,7 @@ func makeInit(root string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
files := data.AssetNames()
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if strings.HasPrefix(file, "init/") {
|
if strings.HasPrefix(file, "init/") {
|
||||||
dst := filepath.Join(root, strings.TrimPrefix(file, "init/"))
|
dst := filepath.Join(root, strings.TrimPrefix(file, "init/"))
|
||||||
|
|
@ -245,6 +245,11 @@ func makeInit(root string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, err := os.Stat(dst); err == nil { // exists
|
||||||
|
log.Error("[setup] %s exists", dst)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
dir := filepath.Dir(dst)
|
dir := filepath.Dir(dst)
|
||||||
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
|
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue