Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion general/login/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ func LoginCmd(c *cli.Context) error {
if c.NArg() > 0 {
return cliutils.WrongNumberOfArgumentsHandler(c)
}
return coreLogin.NewLoginCommand().Run()
return coreLogin.NewLoginCommand().SetServerId(c.String("server-id")).Run()
}
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ func getCommands() ([]cli.Command, error) {
Usage: loginDocs.GetDescription(),
HelpName: corecommon.CreateUsage("login", loginDocs.GetDescription(), loginDocs.Usage),
BashComplete: corecommon.CreateBashCompletionFunc(),
Flags: cliutils.GetCommandFlags(cliutils.Login),
Category: otherCategory,
Action: login.LoginCmd,
},
Expand Down
6 changes: 6 additions & 0 deletions utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ const (
AccessTokenCreate = "access-token-create"
ExchangeOidcToken = "exchange-oidc-token"

// Login command key
Login = "login"

// *** Artifactory Commands' flags ***
// Base flags
url = "url"
Expand Down Expand Up @@ -2140,6 +2143,9 @@ var commandFlags = map[string][]string{
Setup: {
serverId, url, user, password, accessToken, sshPassphrase, sshKeyPath, ClientCertPath, ClientCertKeyPath, Project, setupRepo,
},
Login: {
serverId,
},
}

func GetCommandFlags(cmd string) []cli.Flag {
Expand Down
Loading