Skip to content

Commit

Permalink
fix: make sure to log build task success
Browse files Browse the repository at this point in the history
  • Loading branch information
eysi09 committed Mar 8, 2019
1 parent f2ce8ae commit d0c896a
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 d0c896a

Please sign in to comment.