Просмотр исходного кода

Merge pull request #16052 from markelog/ora-fail

Use ora#fail instead of console.log
Daniel Lee 6 лет назад
Родитель
Сommit
8859d16a41
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);
       await fn(options);
       spinner.succeed();
       spinner.succeed();
     } catch (e) {
     } catch (e) {
-      spinner.fail();
-      console.log(e);
+      spinner.fail(e);
       if (killProcess) {
       if (killProcess) {
         process.exit(1);
         process.exit(1);
       }
       }