fix: Fixed error handling
2d29f47e
With existing logic the error was being thrown if bun was installed
1 file(s) · +1 −1
With existing logic the error was being thrown if bun was installed
| 7 | 7 | async function getPackageManager(): Promise<"bun"> { |
|
| 8 | 8 | const { error } = await tryCatch(execa("bun", ["--version"])); |
|
| 9 | 9 | ||
| 10 | - | if (!error) { |
|
| 10 | + | if (error) { |
|
| 11 | 11 | consola.error(new Error("Bun is not installed.")); |
|
| 12 | 12 | consola.warn("Please install bun from https://bun.sh/"); |
|
| 13 | 13 | process.exit(1); |