1
0
mirror of https://github.com/beego/bee.git synced 2024-06-02 00:43:27 +00:00
This commit is contained in:
astaxie 2015-05-09 18:20:08 +08:00
parent ad453bb3e0
commit e23253bc23

9
new.go
View File

@ -100,9 +100,12 @@ func createApp(cmd *Command, args []string) int {
apppath := path.Join(curpath, args[0]) apppath := path.Join(curpath, args[0])
if _, err := os.Stat(apppath); os.IsNotExist(err) == false { if isExist(apppath) {
fmt.Printf("[ERRO] Path (%s) already exists\n", apppath) ColorLog("[ERRO] Path (%s) already exists\n", apppath)
os.Exit(2) ColorLog("[WARN] Do you want to overwrite it? [yes|no]]")
if !askForConfirmation() {
os.Exit(2)
}
} }
fmt.Println("[INFO] Creating application...") fmt.Println("[INFO] Creating application...")