Commit 2b9cf113 by Oleg Gaidarenko

Use ora#fail instead of console.log

Since with ora#fail you can stderr it instead of using the stdout,
and it's a bit nicer since it will show that cross sign :)
parent d1e48a07
...@@ -10,8 +10,7 @@ export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess ...@@ -10,8 +10,7 @@ export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess
await fn(options); await fn(options);
spinner.succeed(); spinner.succeed();
} catch (e) { } catch (e) {
spinner.fail(); spinner.fail(e);
console.log(e);
if (killProcess) { if (killProcess) {
process.exit(1); process.exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment