mirror of
https://github.com/go-task/task.git
synced 2025-11-27 22:38:20 +02:00
fix: double help is printed when --help is provided (#1806)
This commit is contained in:
@@ -72,6 +72,7 @@ func getEnvFilePath() string {
|
|||||||
fs := pflag.NewFlagSet("experiments", pflag.ContinueOnError)
|
fs := pflag.NewFlagSet("experiments", pflag.ContinueOnError)
|
||||||
fs.StringVarP(&dir, "dir", "d", "", "Sets directory of execution.")
|
fs.StringVarP(&dir, "dir", "d", "", "Sets directory of execution.")
|
||||||
fs.StringVarP(&taskfile, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`)
|
fs.StringVarP(&taskfile, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`)
|
||||||
|
fs.Usage = func() {}
|
||||||
_ = fs.Parse(os.Args[1:])
|
_ = fs.Parse(os.Args[1:])
|
||||||
// If the directory is set, find a .env file in that directory.
|
// If the directory is set, find a .env file in that directory.
|
||||||
if dir != "" {
|
if dir != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user