Skip to content

Commit

Permalink
Merge pull request #611 from garden-io/fix-build-task-log
Browse files Browse the repository at this point in the history
fix: make sure to log build task success
  • Loading branch information
eysi09 authored Mar 11, 2019
2 parents f2ce8ae + d0c896a commit fe7b28c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion garden-service/src/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ export class BuildTask extends BaseTask {
status: "active",
})

const logSuccess = () => {
log.setSuccess({ msg: chalk.green(`Done (took ${log.getDuration(1)} sec)`), append: true })
}

await this.garden.buildDir.syncFromSrc(this.module)

if (!this.force) {
Expand All @@ -80,6 +84,7 @@ export class BuildTask extends BaseTask {
if (status.ready) {
// this is necessary in case other modules depend on files from this one
await this.garden.buildDir.syncDependencyProducts(this.module)
logSuccess()
return { fresh: false }
}
}
Expand All @@ -97,7 +102,7 @@ export class BuildTask extends BaseTask {
throw err
}

log.setSuccess({ msg: chalk.green(`Done (took ${log.getDuration(1)} sec)`), append: true })
logSuccess()
return result
}
}

0 comments on commit fe7b28c

Please sign in to comment.