Переглянути джерело

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 :)
Oleg Gaidarenko 6 роки тому
батько
коміт
2b9cf1132f
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      scripts/cli/utils/useSpinner.ts

+ 1 - 2
scripts/cli/utils/useSpinner.ts

@@ -10,8 +10,7 @@ export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess
       await fn(options);
       spinner.succeed();
     } catch (e) {
-      spinner.fail();
-      console.log(e);
+      spinner.fail(e);
       if (killProcess) {
         process.exit(1);
       }