浏览代码

Fixed safeEcho never printing output when tty decoration is unavailable.

Ako Tulu 1 年之前
父节点
当前提交
9c7fa87977
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      src/Worker.php

+ 2 - 5
src/Worker.php

@@ -2209,15 +2209,12 @@ class Worker
      * Safe Echo.
      * Safe Echo.
      *
      *
      * @param string $msg
      * @param string $msg
+     * @param bool $decorated
      * @return void
      * @return void
      */
      */
     public static function safeEcho(string $msg, bool $decorated = false): void
     public static function safeEcho(string $msg, bool $decorated = false): void
     {
     {
-        if (!(static::$outputDecorated ?? false) && $decorated) {
-            return;
-        }
-
-        if (static::$outputDecorated ?? false) {
+        if ((static::$outputDecorated ?? false) && $decorated) {
             $line = "\033[1A\n\033[K";
             $line = "\033[1A\n\033[K";
             $white = "\033[47;30m";
             $white = "\033[47;30m";
             $green = "\033[32;40m";
             $green = "\033[32;40m";