Skip to content

Commit

Permalink
fix(tasks): respect force flag in task task
Browse files Browse the repository at this point in the history
  • Loading branch information
eysi09 authored and edvald committed Sep 6, 2019
1 parent 7ecbacc commit 3b9ba8e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions garden-service/src/tasks/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,16 @@ export class TaskTask extends BaseTask { // ... to be renamed soon.

// TODO: Re-enable this logic when we've started providing task graph results to process methods.

const cachedResult = getRunTaskResults(dependencyResults)[this.task.name]
if (!this.force) {
const cachedResult = getRunTaskResults(dependencyResults)[this.task.name]

if (cachedResult && cachedResult.success) {
this.log.info({
section: task.name,
}).setSuccess({ msg: chalk.green("Already run") })
if (cachedResult && cachedResult.success) {
this.log.info({
section: task.name,
}).setSuccess({ msg: chalk.green("Already run") })

return cachedResult
return cachedResult
}
}

const log = this.log.info({
Expand Down

0 comments on commit 3b9ba8e

Please sign in to comment.