feat: suppress pixi release notes by default (#1225)

Co-authored-by: Gideon <87426140+GideonBear@users.noreply.github.com>
This commit is contained in:
Sam Vente
2025-07-14 09:51:02 +02:00
committed by GitHub
parent 4a64992054
commit f18ae089ff
3 changed files with 38 additions and 6 deletions

View File

@@ -590,14 +590,21 @@ pub fn run_pixi_update(ctx: &ExecutionContext) -> Result<()> {
// Check if `pixi --help` mentions self-update, if yes, self-update must be enabled.
// pixi self-update --help works regardless of whether the feature is enabled.
let output = ctx.run_type().execute(&pixi).arg("--help").output_checked()?;
let top_level_help_output = ctx.run_type().execute(&pixi).arg("--help").output_checked_utf8()?;
if String::from_utf8(output.stdout)?.contains("self-update") {
ctx.run_type()
if top_level_help_output.stdout.contains("self-update") {
let self_update_help_output = ctx
.run_type()
.execute(&pixi)
.args(["self-update"])
.status_checked()
.ok();
.args(["self-update", "--help"])
.output_checked_utf8()?;
let mut cmd = ctx.run_type().execute(&pixi);
cmd.arg("self-update");
// check if help mentions --no-release-note to check if it is supported
if self_update_help_output.stdout.contains("--no-release-note") && !ctx.config().show_pixi_release_notes() {
cmd.arg("--no-release-note");
}
cmd.status_checked()?;
}
ctx.run_type()