Skip to content

Commit cb07b48

Browse files
committed
fix: copilot review comments
1 parent 985280e commit cb07b48

4 files changed

Lines changed: 19 additions & 18 deletions

File tree

‎internal/flags/flags.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func init() {
155155
pflag.BoolVarP(&Failfast, "failfast", "F", getConfig(config, "FAILFAST", func() *bool { return &config.Failfast }, false), "When running tasks in parallel, stop all tasks if one fails.")
156156
pflag.BoolVarP(&Global, "global", "g", false, "Runs global Taskfile, from $HOME/{T,t}askfile.{yml,yaml}.")
157157
pflag.BoolVar(&Experiments, "experiments", false, "Lists all the available experiments and whether or not they are enabled.")
158-
pflag.BoolVar(&Download, "download", false, "Downloads a cached version of a remote Taskfile.")
158+
pflag.BoolVar(&Download, "download", false, "Forces task to download remote Taskfiles and ignore any cached versions.")
159159
pflag.BoolVar(&Offline, "offline", getConfig(config, "REMOTE_OFFLINE", func() *bool { return config.Remote.Offline }, false), "Forces Task to only use local or cached Taskfiles.")
160160
pflag.StringSliceVar(&TrustedHosts, "trusted-hosts", getConfig(config, "REMOTE_TRUSTED_HOSTS", func() *[]string { return &config.Remote.TrustedHosts }, nil), "List of trusted hosts for remote Taskfiles (comma-separated).")
161161
pflag.DurationVar(&Timeout, "timeout", getConfig(config, "REMOTE_TIMEOUT", func() *time.Duration { return config.Remote.Timeout }, time.Second*10), "Timeout for downloading remote Taskfiles.")

‎website/src/docs/guide.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,8 +2333,7 @@ tasks:
23332333
default:
23342334
cmds:
23352335
- defer:
2336-
echo '{{if .EXIT_CODE}}Failed with
2337-
{{.EXIT_CODE}}!{{else}}Success!{{end}}'
2336+
echo '{{if .EXIT_CODE}}Failed with {{.EXIT_CODE}}!{{else}}Success!{{end}}'
23382337
- exit 1
23392338
```
23402339

‎website/src/docs/reference/config.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ temp-dir: .task
195195
- **Description**: Allow insecure connections when fetching remote Taskfiles
196196
- **CLI equivalent**: `--insecure`
197197
- **Environment variable**:
198-
[`TASK_REMOTE_INSECURE`](./environment.md#task_remote_insecure)
198+
[`TASK_REMOTE_INSECURE`](./environment.md#task-remote-insecure)
199199

200200
```yaml
201201
remote:
@@ -209,7 +209,7 @@ remote:
209209
- **Description**: Work in offline mode, preventing remote Taskfile fetching
210210
- **CLI equivalent**: `--offline`
211211
- **Environment variable**:
212-
[`TASK_REMOTE_OFFLINE`](./environment.md#task_remote_offline)
212+
[`TASK_REMOTE_OFFLINE`](./environment.md#task-remote-offline)
213213

214214
```yaml
215215
remote:
@@ -224,7 +224,7 @@ remote:
224224
- **Description**: Timeout duration for remote operations (e.g., '30s', '5m')
225225
- **CLI equivalent**: `--timeout`
226226
- **Environment variable**:
227-
[`TASK_REMOTE_TIMEOUT`](./environment.md#task_remote_timeout)
227+
[`TASK_REMOTE_TIMEOUT`](./environment.md#task-remote-timeout)
228228

229229
```yaml
230230
remote:
@@ -240,7 +240,7 @@ remote:
240240
'24h')
241241
- **CLI equivalent**: `--expiry`
242242
- **Environment variable**:
243-
[`TASK_REMOTE_CACHE_EXPIRY`](./environment.md#task_remote_cache_expiry)
243+
[`TASK_REMOTE_CACHE_EXPIRY`](./environment.md#task-remote-cache-expiry)
244244

245245
```yaml
246246
remote:
@@ -255,7 +255,7 @@ remote:
255255
absolute path (e.g., `/var/cache/task`) or relative to the Taskfile directory.
256256
- **CLI equivalent**: `--remote-cache-dir`
257257
- **Environment variable**:
258-
[`TASK_REMOTE_CACHE_DIR`](./environment.md#task_remote_cache_dir)
258+
[`TASK_REMOTE_CACHE_DIR`](./environment.md#task-remote-cache-dir)
259259

260260
```yaml
261261
remote:
@@ -270,7 +270,7 @@ remote:
270270
list will not prompt for confirmation when downloading Taskfiles
271271
- **CLI equivalent**: `--trusted-hosts`
272272
- **Environment variable**:
273-
[`TASK_REMOTE_TRUSTED_HOSTS`](./environment.md#task_remote_trusted_hosts)
273+
[`TASK_REMOTE_TRUSTED_HOSTS`](./environment.md#task-remote-trusted-hosts)
274274
(comma-separated)
275275

276276
```yaml

‎website/src/docs/remote-taskfiles.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ are able to tell task to accept these prompts automatically by using the `--yes`
213213
flag or the `--trust` flag. The `--trust` flag allows you to specify trusted
214214
hosts for remote Taskfiles, while `--yes` applies to all prompts in Task. You
215215
can also configure trusted hosts in your
216-
[taskrc configuration](./reference/config.md#remotetrusted-hosts) using
216+
[taskrc configuration](./reference/config.md#remote-trusted-hosts) using
217217
`remote.trusted-hosts`. Before enabling automatic trust, you should:
218218

219219
1. Be sure that you trust the source and contents of the remote Taskfile.
@@ -304,10 +304,10 @@ version. However, the cache expiry duration can be modified by setting the
304304
`--expiry` flag.
305305

306306
If for any reason you lose access to the internet or you are running Task in
307-
offline mode (via the `--offline` flag or `TASK_OFFLINE` environment variable),
308-
Task will run the any available cached files _even if they are expired_. This
309-
means that you should never be stuck without the ability to run your tasks as
310-
long as you have downloaded a remote Taskfile at least once.
307+
offline mode (via the `--offline` flag or `TASK_REMOTE_OFFLINE` environment
308+
variable), Task will run any available cached files _even if they are expired_.
309+
This means that you should never be stuck without the ability to run your tasks
310+
as long as you have downloaded a remote Taskfile at least once.
311311

312312
By default, Task will timeout requests to download remote files after 10 seconds
313313
and look for a cached copy instead. This timeout can be configured by setting
@@ -317,8 +317,8 @@ set the timeout to 5 seconds.
317317
By default, the cache is stored in the Task temp directory (`.task`). You can
318318
override the location of the cache by using the `--remote-cache-dir` flag, the
319319
`remote.cache-dir` option in your
320-
[configuration file](./reference/config.md#remotecache-dir), or the
321-
`TASK_REMOTE_DIR` environment variable. This way, you can share the cache
320+
[configuration file](./reference/config.md#remote-cache-dir), or the
321+
`TASK_REMOTE_CACHE_DIR` environment variable. This way, you can share the cache
322322
between different projects.
323323

324324
You can force Task to ignore the cache and download the latest version by using
@@ -328,8 +328,10 @@ You can use the `--clear-cache` flag to clear all cached remote files.
328328

329329
## Configuration
330330

331-
It is also possible to adjust remote Taskfile functionality can be edited via a
332-
configuration file. Check out the
331+
It is possible to configure the default behavior of remote Taskfiles using
332+
configuration. Check out the following references for more information on how to
333+
set up this configuration using flags, environment variables or a configuration
334+
file:
333335

334336
- [CLI flags](./reference/cli.md#remote)
335337
- [Environment Variables](./reference/environment.md#remote-taskfile-variables)

0 commit comments

Comments
 (0)
⌂ 换网址