@@ -40,32 +40,32 @@ public void Execute()
4040
4141 var arguments = options . Value ;
4242
43- switch ( arguments . Output )
43+ if ( arguments . Output . Contains ( OutputType . BuildServer ) )
4444 {
45- case OutputType . BuildServer :
46- var buildServer = buildServerResolver . Resolve ( ) ;
47- buildServer ? . WriteIntegration ( Console . WriteLine , variables ) ;
48-
49- break ;
50- case OutputType . Json :
51- switch ( arguments . ShowVariable )
52- {
53- case null :
54- Console . WriteLine ( variables . ToString ( ) ) ;
55- break ;
56-
57- default :
58- if ( ! variables . TryGetValue ( arguments . ShowVariable , out var part ) )
59- {
60- throw new WarningException ( $ "' { arguments . ShowVariable } ' variable does not exist" ) ;
61- }
62- Console . WriteLine ( part ) ;
63- break ;
64- }
65-
66- break ;
67- default :
68- throw new ArgumentOutOfRangeException ( ) ;
45+ var buildServer = buildServerResolver . Resolve ( ) ;
46+ buildServer ? . WriteIntegration ( Console . WriteLine , variables ) ;
47+ }
48+ if ( arguments . Output . Contains ( OutputType . Json ) )
49+ {
50+ switch ( arguments . ShowVariable )
51+ {
52+ case null :
53+ Console . WriteLine ( variables . ToString ( ) ) ;
54+ break ;
55+
56+ default :
57+ if ( ! variables . TryGetValue ( arguments . ShowVariable , out var part ) )
58+ {
59+ throw new WarningException ( $ "' { arguments . ShowVariable } ' variable does not exist" ) ;
60+ }
61+
62+ Console . WriteLine ( part ) ;
63+ break ;
64+ }
65+ }
66+ else
67+ {
68+ throw new ArgumentOutOfRangeException ( ) ;
6969 }
7070
7171 if ( arguments . UpdateWixVersionFile )
0 commit comments