cli: fix command prompt showing up on windows (#194946)

cli: fix wsl prompt up on windows machine

Fixes #190425 again
This commit is contained in:
Connor Peet
2023-10-06 09:09:47 -07:00
committed by GitHub
parent 95f948717b
commit e250c8066d
9 changed files with 80 additions and 43 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
use std::{fs, path::Path, process::Command};
use std::{fs, path::Path};
use tempfile::tempdir;
use crate::{
@@ -11,6 +11,7 @@ use crate::{
options::Quality,
update_service::{unzip_downloaded_release, Platform, Release, TargetKind, UpdateService},
util::{
command::new_std_command,
errors::{wrap, AnyError, CodeError, CorruptDownload},
http,
io::{ReportCopyProgress, SilentCopyProgress},
@@ -118,7 +119,7 @@ impl<'a> SelfUpdate<'a> {
}
fn validate_cli_is_good(exe_path: &Path) -> Result<(), AnyError> {
let o = Command::new(exe_path)
let o = new_std_command(exe_path)
.args(["--version"])
.output()
.map_err(|e| CorruptDownload(format!("could not execute new binary, aborting: {}", e)))?;