feat: add color option to CLI and configuration file
The option is used to force enable/disable color output and is passed to the reporter which should respect it
This commit is contained in:
parent
7bae76f496
commit
f9a16d87a1
14 changed files with 112 additions and 11 deletions
|
|
@ -10,7 +10,12 @@ import { version } from '../get-package-info.js';
|
|||
|
||||
const lazyDefaultReporter = async () => import('../reporters/default.js');
|
||||
|
||||
export default async function listCommand({ directory, reporter: reporterConfig, storage: storageConfig }: Config) {
|
||||
export default async function listCommand({
|
||||
directory,
|
||||
reporter: reporterConfig,
|
||||
storage: storageConfig,
|
||||
color,
|
||||
}: Config) {
|
||||
if (!directory) {
|
||||
throw MissingOptionError.fromOption('directory');
|
||||
}
|
||||
|
|
@ -31,7 +36,7 @@ export default async function listCommand({ directory, reporter: reporterConfig,
|
|||
);
|
||||
}
|
||||
|
||||
await reporter.onInit?.({ command: 'list', version, cwd, dry: false, directory });
|
||||
await reporter.onInit?.({ command: 'list', version, cwd, dry: false, directory, color });
|
||||
|
||||
const [storage, storageError] = await exec(async () => storagePlugin.initializeStorage());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue