diff --git a/apps/cli/src/command/dump.command.ts b/apps/cli/src/command/dump.command.ts index d8ef2bf..80926d1 100644 --- a/apps/cli/src/command/dump.command.ts +++ b/apps/cli/src/command/dump.command.ts @@ -77,15 +77,16 @@ export const DumpCommand = new BackendCommand( .addExamples([ { title: 'Save backend configuration to the default adc.yaml file', - command: 'adc dump' + command: 'adc dump', }, { title: 'Save backend configuration to the specified file', - command: 'adc dump -o service-configuration.yaml' + command: 'adc dump -o service-configuration.yaml', }, { title: 'Save only specified resource types from the backend', - command: 'adc dump --include-resource-type global_rule --include-resource-type plugin_metadata', + command: + 'adc dump --include-resource-type global_rule --include-resource-type plugin_metadata', }, { title: 'Save only the resources with the specified labels', @@ -126,7 +127,7 @@ export const DumpCommand = new BackendCommand( try { await tasks.run(); } catch (err) { - //console.log(chalk.red(`Failed to dump backend configuration from backend, ${err}`)); + if (opts.verbose === 2) console.log(err); process.exit(1); } }); diff --git a/apps/cli/src/command/ping.command.ts b/apps/cli/src/command/ping.command.ts index ee0c47f..738ba4f 100644 --- a/apps/cli/src/command/ping.command.ts +++ b/apps/cli/src/command/ping.command.ts @@ -33,6 +33,7 @@ export const PingCommand = new BackendCommand( console.log( chalk.red(`Unable to connect to the "${opts.backend}" backend. ${err}`), ); + if (opts.verbose === 2) console.log(err); process.exit(1); } }); diff --git a/apps/cli/src/command/sync.command.ts b/apps/cli/src/command/sync.command.ts index 29a0a20..ede075e 100644 --- a/apps/cli/src/command/sync.command.ts +++ b/apps/cli/src/command/sync.command.ts @@ -50,8 +50,10 @@ export const SyncCommand = new BackendCommand( command: 'adc sync -f adc.yaml --verbose 2', }, { - title: 'Synchronize only specified resource types from the configuration file', - command: 'adc sync -f adc.yaml --include-resource-type global_rule --include-resource-type plugin_metadata', + title: + 'Synchronize only specified resource types from the configuration file', + command: + 'adc sync -f adc.yaml --include-resource-type global_rule --include-resource-type plugin_metadata', }, { title: 'Synchronize only the resources with the specified lables', @@ -93,6 +95,7 @@ export const SyncCommand = new BackendCommand( try { await tasks.run(); } catch (err) { + if (opts.verbose === 2) console.log(err); process.exit(1); } });