* uv step: checking self subcommand exits; fixes #942 * uv: fixing return behavior --------- Co-authored-by: Lucas Parzianello <lucaspar@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f181a795a6
commit
39f76a3a71
@@ -1032,15 +1032,20 @@ pub fn run_uv(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
let uv_exec = require("uv")?;
|
let uv_exec = require("uv")?;
|
||||||
print_separator("uv");
|
print_separator("uv");
|
||||||
|
|
||||||
|
// try uv self --help first - if it succeeds, we call uv self update
|
||||||
|
let result = ctx
|
||||||
|
.run_type()
|
||||||
|
.execute(&uv_exec)
|
||||||
|
.args(["self", "--help"])
|
||||||
|
.output_checked();
|
||||||
|
|
||||||
|
if result.is_ok() {
|
||||||
ctx.run_type()
|
ctx.run_type()
|
||||||
.execute(&uv_exec)
|
.execute(&uv_exec)
|
||||||
.args(["self", "update"])
|
.args(["self", "update"])
|
||||||
.status_checked()
|
.status_checked()
|
||||||
.ok();
|
.ok();
|
||||||
|
}
|
||||||
// ignoring self-update errors, because they are likely due to uv's
|
|
||||||
// installation being managed by another package manager, in which
|
|
||||||
// case another step will handle the update.
|
|
||||||
|
|
||||||
ctx.run_type()
|
ctx.run_type()
|
||||||
.execute(&uv_exec)
|
.execute(&uv_exec)
|
||||||
|
|||||||
Reference in New Issue
Block a user