diff --git a/src/installer/bin.ts b/src/installer/bin.ts index 81d392f5..175b97ad 100644 --- a/src/installer/bin.ts +++ b/src/installer/bin.ts @@ -109,8 +109,8 @@ function run(): void { console.log(`husky > Done`) } catch (err) { - console.log(chalk.red(err.message.trim())) - debug(err.stack) + console.log(chalk.red((err as NodeJS.ErrnoException).message.trim())) + debug(String((err as NodeJS.ErrnoException).stack)) console.log(chalk.red(`husky > Failed to ${action}`)) } }