[fix] setup if the app.json exist ignore

This commit is contained in:
Max 2022-11-17 14:41:53 +08:00
parent 1610ba85f5
commit e2b98ba745

View file

@ -230,6 +230,13 @@ func makeDirs(root string) error {
func makeInit(root string) error {
files := data.AssetNames()
// if the app.json exist ignore
file := filepath.Join("app.json")
if _, err := os.Stat(filepath.Join(root, file)); err == nil { // exists
return nil
}
for _, file := range files {
if strings.HasPrefix(file, "init/") {
dst := filepath.Join(root, strings.TrimPrefix(file, "init/"))