Skip to content

Commit edfe951

Browse files
committed
merge main
Signed-off-by: Cade Thomas <[email protected]>
1 parent a0d3950 commit edfe951

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/cmd/crane.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ func (o *registryLoginOptions) run(cmd *cobra.Command, args []string) error {
146146
if err != nil {
147147
return err
148148
}
149-
cmd.Flags().Set("username", uname)
149+
err := cmd.Flags().Set("username", uname)
150+
if err != nil {
151+
return err
152+
}
150153
}
151154

152155
if pass == "" && !passStdin {
@@ -158,12 +161,13 @@ func (o *registryLoginOptions) run(cmd *cobra.Command, args []string) error {
158161
if err != nil {
159162
return err
160163
}
161-
cmd.Flags().Set("password", pass)
164+
err := cmd.Flags().Set("password", pass)
165+
if err != nil {
166+
return err
167+
}
162168
}
163-
164169
}
165170
return o.originalRunFn(cmd, args)
166-
167171
}
168172

169173
func newRegistryLoginCommand() *cobra.Command {

0 commit comments

Comments
 (0)