jenkinsci / jenkinsci/plugin-installation-manager-tool
-d flag removes contents of already existing directory, though does not say in README
- Dominant language
- Java
- Stars
- 463
- Forks
- 228
- Avg merge
- 31m
- Merged PRs (30d)
- 15
Description
Using the `-d` or `--plugin-download-directory` will remove the directory/contents specified with the flag, even if there are contents there. This is not reflected in the README:
```
--plugin-download-directory or -d: (optional) Path to the directory in which to install plugins, which can also be set via
the PLUGIN_DIR environment variable. Directory will be created if it does not exist. If no directory is entered, directory
will default to C:\ProgramData\Jenkins\Reference\Plugins if detected OS is Windows, or /usr/share/jenkins/ref/plugins
otherwise.
```
I don't believe this should be the default behavior. There should be at least a warning letting the user know that it whatever is there will be removed or that location already exists. I just found this out the hard way as I pointed `-d` to my current plugins folder which caused the removal of all of my plugins, and now Jenkins wants to uninstall them on next reboot since they're missing.
Please feel free to correct me if I have something wrong.
Contributor guide
Assessment
This issue has not been assessed yet.