Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cli/args/backend_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ impl BackendArg {
let opts_str = opts
.opts
.iter()
// filter out global options that are only relevant for initial installation
.filter(|(k, _)| !["postinstall", "install_env"].contains(&k.as_str()))
.map(|(k, v)| format!("{k}={v}"))
.collect::<Vec<_>>()
.join(",");
Expand Down
14 changes: 10 additions & 4 deletions src/toolset/install_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,16 @@ fn read_backend_meta(short: &str) -> Option<Vec<String>> {
}

pub fn write_backend_meta(ba: &BackendArg) -> Result<()> {
// do not write options for core plugins
let full = match ba.full().starts_with("core:") {
true => ba.full(),
false => ba.full_with_opts(),
// only use full_with_opts for specific plugin prefixes
let full = match ba.full() {
full if full.starts_with("cargo:")
|| full.starts_with("go:")
|| full.starts_with("pipx:")
|| full.starts_with("ubi:") =>
{
ba.full_with_opts()
}
_ => ba.full(),
};
let doc = format!("{}\n{}", ba.short, full);
file::write(backend_meta_path(&ba.short), doc.trim())?;
Expand Down
Loading