Skip to content

Commit 6793b5b

Browse files
authored
Merge pull request usecannon#227 from usecannon/fix-print-skipped-step
prevent printing of `object Object` on skipped step
2 parents 344f440 + 194b8f4 commit 6793b5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cli/src/commands/build.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ export async function build({
114114
runtime.on(Events.PreStepExecute, (t, n, _c, d) => console.log(`${' '.repeat(d)}exec: ${t}.${n}`));
115115
runtime.on(Events.SkipDeploy, (n, err, d) => {
116116
partialDeploy = true;
117-
console.log(`${' '.repeat(d)} -> skip ${n} (${err.toString()})`);
117+
console.log(
118+
`${' '.repeat(d)} -> skip ${n} (${
119+
typeof err === 'object' && err.toString === Object.prototype.toString ? JSON.stringify(err) : err.toString()
120+
})`
121+
);
118122
});
119123

120124
// Check for existing package

0 commit comments

Comments
 (0)