jfrog / jfrog/jfrog-cli-artifactory

Should at least attempt to create $JFROG_CLI_TEMP_DIR when it's set and doesn't exist

Open
#367 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
12
Forks
49
Avg merge
5d 16h
Merged PRs (30d)
13

Description

Is your feature request related to a problem? Please describe.

We're using GitLab CI with fully containerized jobs. So we need to have JFROG_CLI_TEMP_DIR persisted across stages in order for things like Build Info to work. But in order to cache that directory from container to container, we have to set it relative to the directory the build script is running in. But if we don't also add a mkdir ${JFROG_CLI_TEMP_DIR} to the job script, the CLI puts out this error

[Error] open /builds/geo/map/.jftmp/jfrog.cli.temp.-1770276634-261243735: no such file or directory

We don't see these errors when the default temp dir path is used, so it seems that the CLI will create the temp dir if and only if it is the default path.

Describe the solution you'd like to see

If a custom path has been specified and does not exist, the CLI should try to create it.

Describe alternatives you've considered

We're currently manually creating the directory in our job script, but some people don't use the shared CI templates and miss this part then file support tickets.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code that reads JFROG_CLI_TEMP_DIR and creates the default temporary directory. Reproduce the failure with a nonexistent custom path, then verify the CLI attempts to create it while preserving behavior for existing and default paths. Add or update tests for the custom-directory case if the surrounding code has coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.