增加 首次运行提示

This commit is contained in:
dengsgo
2018-09-10 18:00:28 +08:00
parent 0cbe70408d
commit 61cf37763e
2 changed files with 12 additions and 0 deletions

View File

@@ -195,6 +195,13 @@ func initWatcher() {
func parseArgs() {
l := len(os.Args)
if l == 1 {
_, err := ioutil.ReadFile(projectFolder + "/filegirl.yaml")
if err != nil {
log.Println("the filegirl.yaml file is not exist! ", err)
fmt.Print(firstRunHelp)
fmt.Print(helpStr)
return
}
initWatcher()
return
}