From 7f08d5f308a920768d0bea4c00821feba729830d Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 15 Jan 2025 18:38:08 +0200 Subject: [PATCH] fix: typos in docs and var name --- doc/content/community.md | 2 +- doc/content/task-syntax/requires.md | 2 +- doc/content/task-syntax/run-deps.md | 2 +- parser/parser.go | 2 +- run/run.go | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/content/community.md b/doc/content/community.md index 073b6ae..6e7f648 100644 --- a/doc/content/community.md +++ b/doc/content/community.md @@ -1,6 +1,6 @@ --- title: "Community" -description: Contrubutions from the community. +description: Contributions from the community. linkTitle: "Community" menu: { main: { weight: 11 } } --- diff --git a/doc/content/task-syntax/requires.md b/doc/content/task-syntax/requires.md index e5bfcf3..e04bc43 100644 --- a/doc/content/task-syntax/requires.md +++ b/doc/content/task-syntax/requires.md @@ -13,7 +13,7 @@ The `requires` attribute can be used to define tasks that should be run prior to For example, you want to run a task to deploy your code, but you want to run all the unit tests and linters before that happens. -Before the command section of the task, you may define comma seperated dependencies with `requires:` or `req:` followed by the name of the tasks that are dependencies. +Before the command section of the task, you may define comma separated dependencies with `requires:` or `req:` followed by the name of the tasks that are dependencies. ````markdown ## Tasks diff --git a/doc/content/task-syntax/run-deps.md b/doc/content/task-syntax/run-deps.md index c045baa..93b191b 100644 --- a/doc/content/task-syntax/run-deps.md +++ b/doc/content/task-syntax/run-deps.md @@ -8,7 +8,7 @@ menu: { main: { parent: "task-syntax", weight: 11 } } ## RunDeps attribute By default, the dependencies of a task are run sequentially, in the order they are listed. -However we may prefer for all the dependencies of a task to be run in paralled. +However we may prefer for all the dependencies of a task to be run in parallel. The solution would be to set the `RunDeps` attribute to `async` (defaults to `sync`). diff --git a/parser/parser.go b/parser/parser.go index 5e1d21d..e18f355 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -130,7 +130,7 @@ const ( // AttributeTypeInp sets the required inputs for a Task, inputs can be provided // as commandline arguments or environment variables. AttributeTypeInp - // AttrubuteTypeRun sets the tasks requiredBehaviour, can be always or once. + // AttributeTypeRun sets the tasks requiredBehaviour, can be always or once. // Default is always AttributeTypeRun // AttributeTypeRunDeps sets the tasks dependenciesBehaviour, can be sync or async. diff --git a/run/run.go b/run/run.go index 8005292..065119f 100644 --- a/run/run.go +++ b/run/run.go @@ -25,7 +25,7 @@ type Runner struct { tasks models.Tasks dir string alreadyRan map[string]bool - alreadRanMu sync.Mutex + alreadyRanMu sync.Mutex } // NewRunner takes Tasks and returns a Runner. @@ -112,14 +112,14 @@ func (r *Runner) runWithPadding(ctx context.Context, name string, inputs []strin if !ok { return fmt.Errorf("task %s not found", name) } - r.alreadRanMu.Lock() + r.alreadyRanMu.Lock() if task.RequiredBehaviour == models.RequiredBehaviourOnce && r.alreadyRan[task.Name] { - r.alreadRanMu.Unlock() + r.alreadyRanMu.Unlock() fmt.Printf("task %q ran already: skipping\n", task.Name) return nil } r.alreadyRan[task.Name] = true - r.alreadRanMu.Unlock() + r.alreadyRanMu.Unlock() env := os.Environ() env = append(env, task.Env...) inp, err := getInputs(task, inputs, env)