Skip to content

Commit

Permalink
Added method to ctx and env vars to const (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
oshratZairi authored Dec 11, 2024
1 parent 60f1f74 commit 2eca290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/components/commandcomp.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func (c *Context) GetStringFlagValue(flagName string) string {
return c.stringFlags[flagName]
}

func (c *Context) AddStringFlag(key, value string) {
c.stringFlags[key] = value
}

func (c *Context) GetIntFlagValue(flagName string) (value int, err error) {
parsed, err := strconv.ParseInt(c.GetStringFlagValue(flagName), 0, 64)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions utils/coreutils/coreconsts.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ var (
BuildName = "JFROG_CLI_BUILD_NAME"
BuildNumber = "JFROG_CLI_BUILD_NUMBER"
Project = "JFROG_CLI_BUILD_PROJECT"
SigningKey = "JFROG_CLI_SIGNING_KEY"
KeyAlias = "JFROG_CLI_KEY_ALIAS"
//#nosec G101
EncryptionKey = "JFROG_CLI_ENCRYPTION_KEY"
)

0 comments on commit 2eca290

Please sign in to comment.