Skip to content

Commit 1a1f823

Browse files
authored
added yellow warning in vscode cmd (#320)
1 parent 32e38f3 commit 1a1f823

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/commandwindow/CommandWindow.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const ACTION_KEYS = {
6161
INVERT_COLORS: ESC + '[7m',
6262
RESTORE_COLORS: ESC + '[27m',
6363
RED_FOREGROUND: ESC + '[31m',
64+
YELLOW_FOREGROUND: ESC + '[33m',
6465
ALL_DEFAULT_COLORS: ESC + '[0m',
6566

6667
COPY: '\x03',
@@ -724,7 +725,13 @@ export default class CommandWindow implements vscode.Pseudoterminal {
724725
addOutput (output: TextEvent): void {
725726
if (this._initialized) {
726727
if (output.stream === 0) {
727-
this.handleText(output.text, true);
728+
if (output.text.startsWith('Warning:')) {
729+
this._writeEmitter.fire(ACTION_KEYS.YELLOW_FOREGROUND);
730+
this.handleText(output.text, true);
731+
this._writeEmitter.fire(ACTION_KEYS.ALL_DEFAULT_COLORS);
732+
} else {
733+
this.handleText(output.text, true);
734+
}
728735
} else {
729736
this._writeEmitter.fire(ACTION_KEYS.RED_FOREGROUND);
730737
this.handleText(output.text, true);

0 commit comments

Comments
 (0)