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:
saberzero1 2026-03-14 22:31:34 +01:00
parent b0724bf99d
commit cdda0dc520
No known key found for this signature in database

View File

@ -404,7 +404,7 @@ export async function handleBuild(argv) {
const result = await ctx.rebuild().catch((err) => { const result = await ctx.rebuild().catch((err) => {
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`) 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) process.exit(1)
}) })
release() release()