diff --git a/scripts/copy-res.ts b/scripts/copy-res.ts index a13436b..fd5aa60 100755 --- a/scripts/copy-res.ts +++ b/scripts/copy-res.ts @@ -12,9 +12,9 @@ const argv = parseArgs(process.argv.slice(2), {}); const watch = argv.w; const verbose = argv.v; -function errCheck(err?: Error): void { +function errCheck(err: unknown): void { if (err) { - console.error(err.message); + console.error(err instanceof Error ? err.message : err); process.exit(1); } }