Revert "Change cmd_output_bs retcode arg to a boolean check"

This commit is contained in:
Martin Gustafsson 2022-10-30 23:29:13 +01:00 committed by GitHub
parent 0827de1864
commit 19710cd956
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 37 additions and 33 deletions

View file

@ -36,7 +36,7 @@ def get_default_version() -> str:
# Just detecting the executable does not suffice, because if rustup is
# installed but no toolchain is available, then `cargo` exists but
# cannot be used without installing a toolchain first.
if cmd_output_b('cargo', '--version', check=False)[0] == 0:
if cmd_output_b('cargo', '--version', retcode=None)[0] == 0:
return 'system'
else:
return C.DEFAULT