Skip to content

docs: Document default for CLI --data#6359

Merged
jeremylong merged 1 commit intodependency-check:mainfrom
marcelstoer:patch-1
Jan 14, 2024
Merged

docs: Document default for CLI --data#6359
jeremylong merged 1 commit intodependency-check:mainfrom
marcelstoer:patch-1

Conversation

@marcelstoer
Copy link
Collaborator

Fixes Issue

n/a

Description of Change

It took me a while to figure out what the default data dir for the CLI app is.

Have test cases been added to cover the new functionality?

n/a

@boring-cyborg boring-cyborg bot added cli changes to the cli documentation site documentation labels Jan 4, 2024
@marcelstoer marcelstoer changed the title Document default for CLI --data docs: Document default for CLI --data Jan 4, 2024
@jeremylong
Copy link
Collaborator

jeremylong commented Jan 4, 2024

This is not always correct. The path to the data directory is relative to the location of the install directory:

https://github.com/jeremylong/DependencyCheck/blob/361e255562af79fc5326151e9721d9ee3029bf6d/cli/src/main/java/org/owasp/dependencycheck/App.java#L451-L463C73

https://github.com/jeremylong/DependencyCheck/blob/361e255562af79fc5326151e9721d9ee3029bf6d/cli/src/main/conf/unixBinTemplate#L18

I could unzip the CLI anywhere on the system - it will have:

bin/dependency-check.sh

When executed the data directory would be generated right next to the bin directory:

bin/dependency-check.sh
data/

@marcelstoer
Copy link
Collaborator Author

Hhmm...I see. The fact that my data dir is /usr/local/var/dependencycheck is due to the fact that I installed it with brew?

❯ which dependency-check
/usr/local/bin/dependency-check
❯ ls -al /usr/local/bin/dependency-check
lrwxr-xr-x  1 marcelstoer  admin  53 Jan  4 15:22 /usr/local/bin/dependency-check -> ../Cellar/dependency-check/9.0.7/bin/dependency-check

@jeremylong
Copy link
Collaborator

Correct

@marcelstoer
Copy link
Collaborator Author

Shall I update the PR and try to summarize what I learned through these comments? Or did you not document the defaults on purpose in which case I'll close it.

@jeremylong
Copy link
Collaborator

jeremylong commented Jan 4, 2024 via email

@jeremylong jeremylong merged commit 1dec982 into dependency-check:main Jan 14, 2024
@jeremylong
Copy link
Collaborator

Thanks!

@jeremylong jeremylong added this to the 9.0.9 milestone Jan 14, 2024
@marcelstoer marcelstoer deleted the patch-1 branch January 14, 2024 10:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cli changes to the cli documentation site documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants