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 @@
if c.NArg() > 0 {
return cliutils.WrongNumberOfArgumentsHandler(c)
}
return coreLogin.NewLoginCommand().Run()
return coreLogin.NewLoginCommand().SetServerId(c.String("server-id")).Run()

Check failure on line 13 in general/login/cli.go

View workflow job for this annotation

GitHub Actions / Lint

coreLogin.NewLoginCommand().SetServerId undefined (type *"github.com/jfrog/jfrog-cli-core/v2/general/login".LoginCommand has no field or method SetServerId)

Check failure on line 13 in general/login/cli.go

View workflow job for this annotation

GitHub Actions / Static Check

coreLogin.NewLoginCommand().SetServerId undefined (type *"github.com/jfrog/jfrog-cli-core/v2/general/login".LoginCommand has no field or method SetServerId) (typecheck)

Check failure on line 13 in general/login/cli.go

View workflow job for this annotation

GitHub Actions / Go-Sec

coreLogin.NewLoginCommand().SetServerId undefined (type *"github.com/jfrog/jfrog-cli-core/v2/general/login".LoginCommand has no field or method SetServerId)
}
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 @@ -125,6 +125,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 @@ -2123,6 +2126,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