增加 首次运行提示

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
}

5
raw.go
View File

@ -39,6 +39,11 @@ command:
- go env
`
var firstRunHelp = `第一次运行 fileboy ?
你可能需要先执行 fileboy init 生成配置
更多信息查看帮助:
`
var helpStr = `fileboy [option]
Usage of fileboy:
无参数