Skip to content

Update include dir as false if dry-run is setted to prevent the false…#350

Merged
naveenku-jfrog merged 6 commits intojfrog:mainfrom
naveenku-jfrog:fix/RTECO-307-upload-using-the-flags-include-dirs-dry-run-the-package-structure-is-created_
Jan 27, 2026
Merged

Update include dir as false if dry-run is setted to prevent the false…#350
naveenku-jfrog merged 6 commits intojfrog:mainfrom
naveenku-jfrog:fix/RTECO-307-upload-using-the-flags-include-dirs-dry-run-the-package-structure-is-created_

Conversation

@naveenku-jfrog
Copy link
Collaborator

@naveenku-jfrog naveenku-jfrog commented Jan 22, 2026

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

what: Update include dir as false if dry-run is set to prevent the false upload

@naveenku-jfrog naveenku-jfrog added the bug Something isn't working label Jan 22, 2026
if err != nil {
return
}
uploadParams.IncludeDirs = includeDirs && !dryRun
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel we somewhere need to log that --include-dirs flag is ignored as it is dry run

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed it.

@@ -233,10 +230,12 @@ func getUploadParams(f *spec.File, configuration *utils.UploadConfiguration, bui
return
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, isn't it much easier just to say

	if dryRun {
		uploadParams.IncludeDirs = false
	}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way we have to use one more if condition to set include-dir flag if dry-run flag is not set. So, current implementation looks correct.

@github-actions
Copy link
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


@naveenku-jfrog naveenku-jfrog merged commit 20240af into jfrog:main Jan 27, 2026
11 checks passed
naveenku-jfrog added a commit to naveenku-jfrog/jfrog-cli-artifactory that referenced this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants