mise trust
- 用法:
mise trust [FLAGS] [CONFIG_FILE] - 效果: 修改状态
- 源代码:
src/cli/trust.rs
将配置文件标记为受信任
Trust lets mise load the parts of a config file that can run code or change your environment. Without it, mise prompts, skips the file, or fails with an untrusted-config error when it cannot prompt.
A file with no template syntax that contains only min_version, [tools] entries with plain version strings (or arrays of them), and [tasks] in which no task lists secrets does not need trust unless paranoid mode is on. Commands that run project code (mise run, task shorthand such as mise build, mise install, mise exec, mise watch, and mise daemons start|restart|register) trust their active config automatically.
Trusting a config file in a repository's main checkout also trusts the same path in its git worktrees. Paranoid mode (https://mise.jdx.dev/paranoid.html) turns off automatic and worktree trust and requires trust, tied to the file's contents, for every config outside the global and system config. See https://mise.jdx.dev/security.html#configuration-trust
参数
[CONFIG_FILE]— 要更改其信任状态的配置文件
标志
-a --all— 信任当前目录、其父目录及其子目录中的所有配置文件Subdirectories are walked respecting .gitignore, skipping hidden directories and common build and dependency directories (node_modules, vendor, target, dist, build).
--ignore— Do not trust this config and ignore it in the future--show— Show the trust status of config files in the current directory and its parentsDoes not trust or untrust any files.
--untrust— Remove explicit trust for this config-h --help— Print help
示例
Trust the nearest untrusted config in this directory or a parent
mise trustTrust a specific file
mise trust ~/src/app/mise.tomlList configs here and above with their trust status
mise trust --show