File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,26 @@ import { IProjectConfigService } from "../definitions/project";
44import { SupportedConfigValues } from "../tools/config-manipulation/config-transformer" ;
55import { IErrors } from "../common/declarations" ;
66import { color } from "../color" ;
7+ import { IOptions } from "../declarations" ;
78
89export class ConfigListCommand implements ICommand {
910 public allowedParameters : ICommandParameter [ ] = [ ] ;
1011
1112 constructor (
1213 private $projectConfigService : IProjectConfigService ,
14+ private $options : IOptions ,
1315 private $logger : ILogger
1416 ) { }
1517
1618 public async execute ( args : string [ ] ) : Promise < void > {
1719 try {
1820 const config = this . $projectConfigService . readConfig ( ) ;
19- this . $logger . info ( this . getValueString ( config as SupportedConfigValues ) ) ;
21+ if ( this . $options . json ) {
22+ console . log ( JSON . stringify ( config ) )
23+ } else {
24+ this . $logger . info ( this . getValueString ( config as SupportedConfigValues ) ) ;
25+
26+ }
2027 } catch ( error ) {
2128 this . $logger . info ( "Failed to read config. Error is: " , error ) ;
2229 }
You can’t perform that action at this time.
0 commit comments