jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

$JFROG_CLI_HOME_DIR is not respected for projects folder

Open biolauri opened this issue 1 year ago • 0 comments

Describe the bug

With the environment variable $JFROG_CLI_HOME_DIR, it's possible to set the JFrog CLI home directory path, defaulting to ~/.jfrog. This option is not respected by some commands, e.g. jf npm-config.

Current behavior

Running JFROG_CLI_HOME_DIR=.config/jfrog jf npmc (omitting any configuration items is on purpose for easier reproduction) will create the following files and directories:

  1. .config/jfrog/Latest_Cli_Version_Check_Indicator
  2. .jfrog/projects/ (when called with any configuration items, there's an npm.yaml inside)

The first entry is as expected as it uses the directory given by the environment variable, the second entry is not as expected. It (still) uses the default value of the environment variable and should also use the given one.

Reproduction steps

  1. Install latest version of JFrog CLI
  2. Run JFROG_CLI_HOME_DIR=.config/jfrog jf npmc

Expected behavior

Running JFROG_CLI_HOME_DIR=.config/jfrog jf npmc (omitting any configuration items is on purpose for easier reproduction) will create the following files and directories:

  1. .config/jfrog/Latest_Cli_Version_Check_Indicator
  2. .config/jfrog/projects/ (when called with any configuration items, there's an npm.yaml inside)

JFrog CLI version

jf version 2.53.2

Operating system type and version

macOS Sonoma (Version 14.3.1) & Jenkins 2.426.3 with JFrog Plugin Version 1.5.0

JFrog Artifactory version

n/a

JFrog Xray version

n/a

biolauri avatar Mar 12 '24 18:03 biolauri