Skip to content

Commit 19329ed

Browse files
fix: require username and password for zarf tools registry login (#3676)
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
1 parent 531daa6 commit 19329ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cmd/crane.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ func newRegistryCommand() *cobra.Command {
105105
func newRegistryLoginCommand() *cobra.Command {
106106
cmd := craneCmd.NewCmdAuthLogin()
107107
cmd.Example = ""
108+
err := cmd.MarkFlagRequired("username")
109+
if err != nil {
110+
logger.Default().Error("failed to mark username flag required", "error", err.Error())
111+
}
112+
err = cmd.MarkFlagRequired("password")
113+
if err != nil {
114+
logger.Default().Error("failed to mark password flag required", "error", err.Error())
115+
}
108116
return cmd
109117
}
110118

0 commit comments

Comments
 (0)