Skip to content

Commit b2706c4

Browse files
committed
lint and bugfix
1 parent d807a79 commit b2706c4

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

pkg/cmd/deregister/deregister.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func NewCmdDeregister(t *terminal.Terminal, store DeregisterStore) *cobra.Comman
9595
return cmd
9696
}
9797

98-
func runDeregister(ctx context.Context, t *terminal.Terminal, s DeregisterStore, deps deregisterDeps, skipConfirm bool) error { //nolint:funlen // deregistration flow
98+
func runDeregister(ctx context.Context, t *terminal.Terminal, s DeregisterStore, deps deregisterDeps, skipConfirm bool) error { //nolint:funlen,gocyclo // deregistration flow
9999
if !deps.platform.IsCompatible() {
100100
return fmt.Errorf("brev deregister is only supported on Linux")
101101
}

pkg/cmd/register/register.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,9 @@ func runRegister(ctx context.Context, t *terminal.Terminal, s RegisterStore, opt
231231
enableSSH := false
232232
sshPortForGrant := int32(0)
233233
if opts.interactive {
234-
if opts.skipConfirm {
235-
enableSSH = true
236-
sshPortForGrant = 0 // will prompt for port in grantSSHAccessWithPort
237-
} else {
238-
enableSSH = deps.prompter.ConfirmYesNo("Would you like to enable SSH access to this device?")
239-
if enableSSH {
240-
sshPortForGrant = 0 // prompt for port
241-
}
234+
enableSSH = deps.prompter.ConfirmYesNo("Would you like to enable SSH access to this device?")
235+
if enableSSH {
236+
sshPortForGrant = 0 // prompt for port
242237
}
243238
} else if opts.sshPort != 0 {
244239
enableSSH = true

0 commit comments

Comments
 (0)