From a35f697341c5a0c83d64382e9c44f3a82aca99ae Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 14 Mar 2025 10:54:17 -0400 Subject: [PATCH 1/3] Clarify docs for --dir option --- internal/flags/flags.go | 2 +- website/versioned_docs/version-latest/reference/cli.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 7d437537de..fdff6665f8 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -105,7 +105,7 @@ func init() { pflag.BoolVarP(&Dry, "dry", "n", false, "Compiles and prints tasks in the order that they would be run, without executing them.") pflag.BoolVar(&Summary, "summary", false, "Show summary about a task.") pflag.BoolVarP(&ExitCode, "exit-code", "x", false, "Pass-through the exit code of the task command.") - pflag.StringVarP(&Dir, "dir", "d", "", "Sets directory of execution.") + pflag.StringVarP(&Dir, "dir", "d", "", "Sets the starting directory to search for the Taskfile.") pflag.StringVarP(&Entrypoint, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`) pflag.StringVarP(&Output.Name, "output", "o", "", "Sets output style: [interleaved|group|prefixed].") pflag.StringVar(&Output.Group.Begin, "output-group-begin", "", "Message template to print before a task's grouped output.") diff --git a/website/versioned_docs/version-latest/reference/cli.mdx b/website/versioned_docs/version-latest/reference/cli.mdx index 4afe84b836..f2520679e4 100644 --- a/website/versioned_docs/version-latest/reference/cli.mdx +++ b/website/versioned_docs/version-latest/reference/cli.mdx @@ -24,7 +24,7 @@ If `--` is given, all remaining arguments will be assigned to a special | ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. | | `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. | -| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. | +| `-d` | `--dir` | `string` | Working directory | Sets the starting directory to search for the Taskfile. | | `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. | | `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. | | `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. | From 172d57dacb098e2fa01e513ca6bb085e7d50fa8f Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Thu, 17 Apr 2025 20:04:28 -0300 Subject: [PATCH 2/3] docs: improve wording --- internal/flags/flags.go | 2 +- website/versioned_docs/version-latest/reference/cli.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index fdff6665f8..96da16d19b 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -105,7 +105,7 @@ func init() { pflag.BoolVarP(&Dry, "dry", "n", false, "Compiles and prints tasks in the order that they would be run, without executing them.") pflag.BoolVar(&Summary, "summary", false, "Show summary about a task.") pflag.BoolVarP(&ExitCode, "exit-code", "x", false, "Pass-through the exit code of the task command.") - pflag.StringVarP(&Dir, "dir", "d", "", "Sets the starting directory to search for the Taskfile.") + pflag.StringVarP(&Dir, "dir", "d", "", "Sets the directory in which Task will execute and look for a Taskfile.") pflag.StringVarP(&Entrypoint, "taskfile", "t", "", `Choose which Taskfile to run. Defaults to "Taskfile.yml".`) pflag.StringVarP(&Output.Name, "output", "o", "", "Sets output style: [interleaved|group|prefixed].") pflag.StringVar(&Output.Group.Begin, "output-group-begin", "", "Message template to print before a task's grouped output.") diff --git a/website/versioned_docs/version-latest/reference/cli.mdx b/website/versioned_docs/version-latest/reference/cli.mdx index f2520679e4..e5094a9a42 100644 --- a/website/versioned_docs/version-latest/reference/cli.mdx +++ b/website/versioned_docs/version-latest/reference/cli.mdx @@ -24,7 +24,7 @@ If `--` is given, all remaining arguments will be assigned to a special | ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. | | `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. | -| `-d` | `--dir` | `string` | Working directory | Sets the starting directory to search for the Taskfile. | +| `-d` | `--dir` | `string` | Working directory | Sets the directory in which Task will execute and look for a Taskfile. | | `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. | | `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. | | `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. | From 8c2c47b99de280987d48b5c6e1290e9ad9750768 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Thu, 17 Apr 2025 20:06:24 -0300 Subject: [PATCH 3/3] docs: do not edit versioned docs --- website/docs/reference/cli.mdx | 2 +- website/versioned_docs/version-latest/reference/cli.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index 4afe84b836..e5094a9a42 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -24,7 +24,7 @@ If `--` is given, all remaining arguments will be assigned to a special | ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. | | `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. | -| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. | +| `-d` | `--dir` | `string` | Working directory | Sets the directory in which Task will execute and look for a Taskfile. | | `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. | | `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. | | `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. | diff --git a/website/versioned_docs/version-latest/reference/cli.mdx b/website/versioned_docs/version-latest/reference/cli.mdx index e5094a9a42..4afe84b836 100644 --- a/website/versioned_docs/version-latest/reference/cli.mdx +++ b/website/versioned_docs/version-latest/reference/cli.mdx @@ -24,7 +24,7 @@ If `--` is given, all remaining arguments will be assigned to a special | ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. | | `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. | -| `-d` | `--dir` | `string` | Working directory | Sets the directory in which Task will execute and look for a Taskfile. | +| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. | | `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. | | `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. | | `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. |