提交 7a9960b0 编写于 作者: chai2010's avatar chai2010

命令行无参数时打印帮助信息

上级 936e8dd6
......@@ -52,8 +52,7 @@ func main() {
// 没有参数时对应 run 命令
cliApp.Action = func(c *cli.Context) error {
if c.NArg() == 0 {
fmt.Fprintf(os.Stderr, "no input file")
os.Exit(1)
cli.ShowAppHelpAndExit(c, 0)
}
waApp := app.NewApp(build_Options(c))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册