Support full --no-ansi options

This commit is contained in:
crazywhalecc
2025-12-09 16:54:29 +08:00
parent b0f630f95f
commit bcaef59a15
4 changed files with 30 additions and 12 deletions

View File

@@ -70,7 +70,8 @@ abstract class BaseCommand extends Command
});
$version = $this->getVersionWithCommit();
if (!$this->no_motd) {
echo str_replace('{version}', '' . ConsoleColor::none("v{$version}"), '' . ConsoleColor::magenta(self::$motd));
$str = str_replace('{version}', '' . ConsoleColor::none("v{$version}"), '' . ConsoleColor::magenta(self::$motd));
echo $this->input->getOption('no-ansi') ? strip_ansi_colors($str) : $str;
}
}