jawher/mow.cli

Application Hang

Closed this issue · 3 comments

If we have environment variables set, and try to run the application with custom flags, app hangs.

app := cli.App("sample", "sample application")
addr := app.String(cli.StringOpt{
	Name:   "l",
	Value:  "listen",
	EnvVar: "LISTEN",
	Desc:   "listen to address.",
})
err := app.Run(os.Args)
if err != nil {
	log.Println(err)
	cli.Exit(1)
}

and in terminal

$ export LISTEN=test
$ ./app -l=test2

The app will hang, Not even app.Before or app.Action is called..

Just to be sure, this bug affected an older version of mow.cli right ?

Yea, I saw the earlier issue about this, and updated my vendor folder. The issue was fixed after that, thanks 👍

Ok, thanks for the reply 😃