Skip to content

Commit ffad94e

Browse files
committed
fix: update
1 parent f08fc2a commit ffad94e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

index.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,21 @@ async function init() {
724724
shell: process.platform === 'win32',
725725
})
726726

727-
child.on('close', () => {
728-
console.log(outroMessage)
727+
child.on('close', (code) => {
728+
if (code === 0) {
729+
console.log(outroMessage)
730+
} else {
731+
console.error(
732+
red(`\n${bold('Error:')} Dependency installation failed with exit code ${code}.`),
733+
)
734+
console.error(
735+
red(
736+
'Please check the output above for details and try running the install command manually:',
737+
),
738+
)
739+
console.error(bold(green(getCommand(packageManager, 'install'))))
740+
process.exit(code)
741+
}
729742
})
730743
}
731744

0 commit comments

Comments
 (0)