feat: finally implement app new command

This commit is contained in:
2021-07-31 15:50:04 +02:00
parent 932803453e
commit 42968fb8e1
4 changed files with 68 additions and 26 deletions

View File

@ -208,6 +208,10 @@ func CopyAppEnvSample(appType, appName, server string) error {
}
appEnvPath := path.Join(ABRA_DIR, "servers", server, fmt.Sprintf("%s.env", appName))
if _, err := os.Stat(appEnvPath); err == nil {
return fmt.Errorf("%s already exists?", appEnvPath)
}
err = ioutil.WriteFile(appEnvPath, envSample, 0755)
if err != nil {
return err