Skip to content

Commit

Permalink
fix: resolve comment
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Oct 27, 2022
1 parent f418a78 commit b3a26e1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions cmd/notation/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ Example - Login using $NOTATION_USERNAME $NOTATION_PASSWORD variables:
if err := readPassword(opts); err != nil {
return err
}

// check username
if opts.Username == "" {
return errors.New("username is not set.")
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -82,9 +77,7 @@ func runLogin(cmd *cobra.Command, opts *loginOpts) error {
return fmt.Errorf("failed to store credentials: %v", err)
}

if err == nil {
fmt.Println("Login Succeeded")
}
fmt.Println("Login Succeeded")
return nil
}

Expand Down

0 comments on commit b3a26e1

Please sign in to comment.