@@ -201,8 +201,7 @@ type BrowsersListInput struct {
201201
202202func (b BrowsersCmd ) List (ctx context.Context , in BrowsersListInput ) error {
203203 if in .Output != "" && in .Output != "json" {
204- pterm .Error .Println ("unsupported --output value: use 'json'" )
205- return nil
204+ return fmt .Errorf ("unsupported --output value: use 'json'" )
206205 }
207206
208207 params := kernel.BrowserListParams {}
@@ -290,8 +289,7 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error {
290289
291290func (b BrowsersCmd ) Create (ctx context.Context , in BrowsersCreateInput ) error {
292291 if in .Output != "" && in .Output != "json" {
293- pterm .Error .Println ("unsupported --output value: use 'json'" )
294- return nil
292+ return fmt .Errorf ("unsupported --output value: use 'json'" )
295293 }
296294
297295 if in .Output != "json" {
@@ -475,8 +473,7 @@ func (b BrowsersCmd) Delete(ctx context.Context, in BrowsersDeleteInput) error {
475473
476474func (b BrowsersCmd ) View (ctx context.Context , in BrowsersViewInput ) error {
477475 if in .Output != "" && in .Output != "json" {
478- pterm .Error .Println ("unsupported --output value: use 'json'" )
479- return nil
476+ return fmt .Errorf ("unsupported --output value: use 'json'" )
480477 }
481478
482479 browser , err := b .browsers .Get (ctx , in .Identifier )
@@ -506,8 +503,7 @@ func (b BrowsersCmd) View(ctx context.Context, in BrowsersViewInput) error {
506503
507504func (b BrowsersCmd ) Get (ctx context.Context , in BrowsersGetInput ) error {
508505 if in .Output != "" && in .Output != "json" {
509- pterm .Error .Println ("unsupported --output value: use 'json'" )
510- return nil
506+ return fmt .Errorf ("unsupported --output value: use 'json'" )
511507 }
512508
513509 browser , err := b .browsers .Get (ctx , in .Identifier )
@@ -909,8 +905,7 @@ type BrowsersReplaysDownloadInput struct {
909905
910906func (b BrowsersCmd ) ReplaysList (ctx context.Context , in BrowsersReplaysListInput ) error {
911907 if in .Output != "" && in .Output != "json" {
912- pterm .Error .Println ("unsupported --output value: use 'json'" )
913- return nil
908+ return fmt .Errorf ("unsupported --output value: use 'json'" )
914909 }
915910
916911 br , err := b .browsers .Get (ctx , in .Identifier )
@@ -949,8 +944,7 @@ func (b BrowsersCmd) ReplaysList(ctx context.Context, in BrowsersReplaysListInpu
949944
950945func (b BrowsersCmd ) ReplaysStart (ctx context.Context , in BrowsersReplaysStartInput ) error {
951946 if in .Output != "" && in .Output != "json" {
952- pterm .Error .Println ("unsupported --output value: use 'json'" )
953- return nil
947+ return fmt .Errorf ("unsupported --output value: use 'json'" )
954948 }
955949
956950 br , err := b .browsers .Get (ctx , in .Identifier )
@@ -1121,8 +1115,7 @@ func (b BrowsersCmd) PlaywrightExecute(ctx context.Context, in BrowsersPlaywrigh
11211115
11221116func (b BrowsersCmd ) ProcessExec (ctx context.Context , in BrowsersProcessExecInput ) error {
11231117 if in .Output != "" && in .Output != "json" {
1124- pterm .Error .Println ("unsupported --output value: use 'json'" )
1125- return nil
1118+ return fmt .Errorf ("unsupported --output value: use 'json'" )
11261119 }
11271120
11281121 if b .process == nil {
@@ -1194,8 +1187,7 @@ func (b BrowsersCmd) ProcessExec(ctx context.Context, in BrowsersProcessExecInpu
11941187
11951188func (b BrowsersCmd ) ProcessSpawn (ctx context.Context , in BrowsersProcessSpawnInput ) error {
11961189 if in .Output != "" && in .Output != "json" {
1197- pterm .Error .Println ("unsupported --output value: use 'json'" )
1198- return nil
1190+ return fmt .Errorf ("unsupported --output value: use 'json'" )
11991191 }
12001192
12011193 if b .process == nil {
@@ -1499,8 +1491,7 @@ func (b BrowsersCmd) FSDownloadDirZip(ctx context.Context, in BrowsersFSDownload
14991491
15001492func (b BrowsersCmd ) FSFileInfo (ctx context.Context , in BrowsersFSFileInfoInput ) error {
15011493 if in .Output != "" && in .Output != "json" {
1502- pterm .Error .Println ("unsupported --output value: use 'json'" )
1503- return nil
1494+ return fmt .Errorf ("unsupported --output value: use 'json'" )
15041495 }
15051496
15061497 if b .fs == nil {
@@ -1532,8 +1523,7 @@ func (b BrowsersCmd) FSFileInfo(ctx context.Context, in BrowsersFSFileInfoInput)
15321523
15331524func (b BrowsersCmd ) FSListFiles (ctx context.Context , in BrowsersFSListFilesInput ) error {
15341525 if in .Output != "" && in .Output != "json" {
1535- pterm .Error .Println ("unsupported --output value: use 'json'" )
1536- return nil
1526+ return fmt .Errorf ("unsupported --output value: use 'json'" )
15371527 }
15381528
15391529 if b .fs == nil {
@@ -2178,6 +2168,7 @@ func runBrowsersCreate(cmd *cobra.Command, args []string) error {
21782168 "pool-id" : true ,
21792169 "pool-name" : true ,
21802170 "timeout" : true ,
2171+ "output" : true ,
21812172 // Global persistent flags that don't configure browsers
21822173 "no-color" : true ,
21832174 "log-level" : true ,
0 commit comments