1
0
mirror of https://github.com/go-task/task.git synced 2025-09-16 09:26:16 +02:00

fix: double help is printed when --help is provided (#1806)

This commit is contained in:
Valentin Maerten
2024-09-14 11:16:47 +02:00
committed by GitHub
parent 114d5e1404
commit 15aa4b86af

View File

@@ -72,6 +72,7 @@ func getEnvFilePath() string {
fs := pflag.NewFlagSet("experiments", pflag.ContinueOnError)
fs.StringVarP(&dir, "dir", "d", "", "Sets directory of execution.")
fs.StringVarP(&taskfile, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`)
fs.Usage = func() {}
_ = fs.Parse(os.Args[1:])
// If the directory is set, find a .env file in that directory.
if dir != "" {