Skip to content

Commit 36b3d1b

Browse files
committed
good bot
1 parent a90c953 commit 36b3d1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/browsers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,11 @@ func (b BrowsersCmd) Update(ctx context.Context, in BrowsersUpdateInput) error {
550550
hasProfileChange := in.ProfileID != "" || in.ProfileName != ""
551551
hasViewportChange := in.Viewport != ""
552552

553+
// Validate --save-changes is only used with a profile
554+
if in.ProfileSaveChanges.Set && !hasProfileChange {
555+
return fmt.Errorf("--save-changes requires --profile-id or --profile-name")
556+
}
557+
553558
// Validate that at least one update option is provided
554559
if !hasProxyChange && !hasProfileChange && !hasViewportChange {
555560
return fmt.Errorf("must specify at least one of: --proxy-id, --clear-proxy, --profile-id, --profile-name, or --viewport")

0 commit comments

Comments
 (0)