Skip to content

Commit

Permalink
improvement(tasks): minor logging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Apr 29, 2019
1 parent 81b8d58 commit 18e0485
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion garden-service/src/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class BuildTask extends BaseTask {

const log = this.log.info({
section: this.getName(),
msg: `Syncing sources...`,
msg: `Staging build...`,
status: "active",
})

Expand Down
4 changes: 3 additions & 1 deletion garden-service/src/tasks/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export class PushTask extends BaseTask {
throw err
}

if (result.message) {
if (result.pushed) {
log.setSuccess({ msg: chalk.green(result.message || `Done (took ${log.getDuration(1)} sec)`), append: true })
} else if (result.message) {
log.setWarn({ msg: result.message, append: true })
} else {
log.setSuccess({ msg: chalk.green(result.message || `Done (took ${log.getDuration(1)} sec)`), append: true })
Expand Down
6 changes: 5 additions & 1 deletion garden-service/src/util/validate-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ export function detectMissingDependencies(
const errMsg = "Unknown dependencies detected.\n\n" +
indentString(missingDepDescriptions.join("\n\n"), 2) + "\n"

return new ConfigurationError(errMsg, { "unknown-dependencies": missingDepDescriptions })
return new ConfigurationError(errMsg, {
unknownDependencies: missingDepDescriptions,
availableModules: Array.from(moduleNames),
availableServicesAndTasks: Array.from(runtimeNames),
})
} else {
return null
}
Expand Down

0 comments on commit 18e0485

Please sign in to comment.