mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-21 21:45:42 -05:00
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:
parent
b0724bf99d
commit
cdda0dc520
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user