Skip to content

Commit

Permalink
fix: deprecate @System versions (#3467)
Browse files Browse the repository at this point in the history
Users are confused about what this does, MISE_DISABLE_TOOLS does the same thing but is easier to understand.
  • Loading branch information
jdx authored Dec 11, 2024
1 parent 15fa19e commit f4d0744
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .idea/mise.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/man1/mise.1
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ Examples:
$ mise use node@20 Use node\-20.x in current project
$ mise use \-g node@20 Use node\-20.x as default
$ mise use node@latest Use latest node in current directory
$ mise use \-g node@system Use system node everywhere unless overridden

$ mise up \-\-interactive Show a menu to upgrade tools

Expand Down
1 change: 0 additions & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ static AFTER_LONG_HELP: &str = color_print::cstr!(
$ <bold>mise use node@20</bold> Use node-20.x in current project
$ <bold>mise use -g node@20</bold> Use node-20.x as default
$ <bold>mise use node@latest</bold> Use latest node in current directory
$ <bold>mise use -g node@system</bold> Use system node everywhere unless overridden
$ <bold>mise up --interactive</bold> Show a menu to upgrade tools
Expand Down
8 changes: 7 additions & 1 deletion src/toolset/tool_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ impl ToolVersion {
ToolRequest::Sub { .. } => self.version.to_string(),
ToolRequest::Ref { ref_: r, .. } => format!("ref-{}", r),
ToolRequest::Path { path: p, .. } => format!("path-{}", hash_to_str(p)),
ToolRequest::System { .. } => "system".to_string(),
ToolRequest::System { .. } => {
deprecated!(
"system_tool_version",
"@system is deprecated, use MISE_DISABLE_TOOLS instead"
);
"system".to_string()
}
}
.replace([':', '/'], "-")
}
Expand Down

0 comments on commit f4d0744

Please sign in to comment.