@@ -3,13 +3,14 @@ package cliutils
33import (
44 "errors"
55 "fmt"
6- "github.com/jfrog/jfrog-cli-core/v2/common/project"
76 "io"
87 "os"
98 "path/filepath"
109 "strconv"
1110 "strings"
1211
12+ "github.com/jfrog/jfrog-cli-core/v2/common/project"
13+
1314 "github.com/jfrog/jfrog-cli-core/v2/common/commands"
1415 "github.com/jfrog/jfrog-cli-core/v2/common/spec"
1516 "github.com/jfrog/jfrog-cli-core/v2/utils/config"
@@ -264,14 +265,14 @@ func FixWinPathsForFileSystemSourcedCmds(uploadSpec *spec.SpecFiles, specFlag, e
264265// Retrieves the application key from the .jfrog/config file or the environment variable.
265266// If the application key is not found in either, returns an empty string.
266267func ReadJFrogApplicationKeyFromConfigOrEnv () (applicationKeyValue string ) {
267- applicationKeyValue = getApplicationKeyFromConfig ( )
268+ applicationKeyValue = os . Getenv ( coreutils . ApplicationKey )
268269 if applicationKeyValue != "" {
269- log .Debug ("Found application key in config file :" , applicationKeyValue )
270+ log .Debug ("Found application key in environment variable :" , applicationKeyValue )
270271 return
271272 }
272- applicationKeyValue = os . Getenv ( coreutils . ApplicationKey )
273+ applicationKeyValue = getApplicationKeyFromConfig ( )
273274 if applicationKeyValue != "" {
274- log .Debug ("Found application key in environment variable :" , applicationKeyValue )
275+ log .Debug ("Found application key in config file :" , applicationKeyValue )
275276 return
276277 }
277278 log .Debug ("Application key is not found in the config file or environment variable." )
0 commit comments