Repository navigation
feat: add DPRINT_AUTO_INSTALL env var - #1466
Merged
dsherret merged 4 commits intoNov 30, 2026
Merged
Conversation
Signed-off-by: Priyansh <[email protected]>
…ppen - don't download when a cached plugin is corrupt or missing files, for the executable of a local or node_modules process plugin, or to suggest a version - allow `dprint install <plugin>`, `dprint add`, `dprint init`, and `dprint config update` to install plugins - say to run `dprint install --reload` when using `--reload` - don't ask in editors about a download that won't happen - add to the help text and say to run `dprint install` in the docs
- `1` and `true` install plugins automatically (default), `wasm` only installs Wasm plugins, and anything else installs nothing - don't set up a local process plugin automatically when process plugins aren't, because setting it up runs it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
DPRINT_AUTO_INSTALLenvironment variable for controlling which plugins dprint installs automatically:1ortrue- Automatically install plugins (default when not set or empty).wasm(case insensitive) - Only automatically install Wasm plugins and not process plugins.0,false) - Don't automatically install plugins.Only the exact values above allow installing, so a typo or a value this version doesn't know about never installs anything.
When a plugin isn't installed and can't be installed automatically, dprint errors and says to run
dprint install.node_modules, and--reload(which says to rundprint install --reload).dprint install,dprint add,dprint init, anddprint config update).This only prevents installing plugins. Remote configuration files are still downloaded and a process plugin that's already installed is still used, so it doesn't make it safe to run dprint with an untrusted configuration file.
Fixes #1411.