Skip to content

Commit 5634e9f

Browse files
thesayynimhoffd
authored andcommitted
fix(help): custom colors are not passed to SchemaHelpFormatter (#4115)
1 parent 84a6b7f commit 5634e9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/@ionic/cli-framework/src/lib/executor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ export class BaseExecutor<C extends ICommand<C, N, M, I, O>, N extends INamespac
124124
let formatter: HelpFormatter;
125125

126126
if (isCommand(location.obj)) {
127-
const options = { location, command: location.obj };
127+
const options = { location, command: location.obj, colors: this.colors };
128128
formatter = format === 'json' ? new CommandSchemaHelpFormatter(options) : new CommandStringHelpFormatter(options);
129129
} else {
130-
const options = { location, namespace: location.obj };
130+
const options = { location, namespace: location.obj, colors: this.colors };
131131
formatter = format === 'json' ? new NamespaceSchemaHelpFormatter(options) : new NamespaceStringHelpFormatter(options);
132132
}
133133

@@ -150,8 +150,8 @@ export class BaseExecutor<C extends ICommand<C, N, M, I, O>, N extends INamespac
150150
const location = await this.namespace.locate(cmdpath);
151151

152152
const formatter = isCommand(location.obj)
153-
? new CommandSchemaHelpFormatter({ location, command: location.obj })
154-
: new NamespaceSchemaHelpFormatter({ location, namespace: location.obj });
153+
? new CommandSchemaHelpFormatter({ location, command: location.obj, colors: this.colors })
154+
: new NamespaceSchemaHelpFormatter({ location, namespace: location.obj, colors: this.colors });
155155

156156
return formatter.serialize();
157157
});

0 commit comments

Comments
 (0)