fix: pass string to styleText instead of Error object
styleText('grey', err) throws ERR_INVALID_ARG_TYPE when err is an Error
object. Use err.message ?? String(err) to pass a string instead.
This commit is contained in:
@@ -404,7 +404,7 @@ export async function handleBuild(argv) {
|
||||
|
||||
const result = await ctx.rebuild().catch((err) => {
|
||||
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`)
|
||||
console.log(`Reason: ${styleText("grey", err)}`)
|
||||
console.log(`Reason: ${styleText("grey", err.message ?? String(err))}`)
|
||||
process.exit(1)
|
||||
})
|
||||
release()
|
||||
|
||||
Reference in New Issue
Block a user