Skip to content

Commit

Permalink
use nodejs/golang for writing to .tool-versions
Browse files Browse the repository at this point in the history
Fixes #1522
  • Loading branch information
jdx committed Jan 27, 2024
1 parent 470dfe9 commit 14fb790
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/config/config_file/tool_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,13 @@ impl ConfigFile for ToolVersions {
.max()
.unwrap_or_default();
for (_, tv) in &self.plugins {
let plugin = pad_str(&tv.orig_name, max_plugin_len, Alignment::Left, None);
let mut plugin = tv.orig_name.to_string();
if plugin == "node" {
plugin = "nodejs".into();
} else if plugin == "go" {
plugin = "golang".into();
}
let plugin = pad_str(&plugin, max_plugin_len, Alignment::Left, None);
s.push_str(&format!("{} {}{}", plugin, tv.versions.join(" "), tv.post));
}

Expand Down

0 comments on commit 14fb790

Please sign in to comment.