mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 12:27:16 +03:00
fix(cli.rs): info
version checks not striping \r
on Windows (#1952)
This commit is contained in:
parent
dc6b0d8522
commit
6a95d7acc3
5
.changes/fix-windows-info-cmd.md
Normal file
5
.changes/fix-windows-info-cmd.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
---
|
||||
|
||||
Fixes `info` command not striping `\r` from child process version output.
|
@ -206,7 +206,11 @@ fn get_version(command: &str, args: &[&str]) -> crate::Result<Option<String>> {
|
||||
|
||||
let output = cmd.args(args).arg("--version").output()?;
|
||||
let version = if output.status.success() {
|
||||
Some(String::from_utf8_lossy(&output.stdout).replace("\n", ""))
|
||||
Some(
|
||||
String::from_utf8_lossy(&output.stdout)
|
||||
.replace("\n", "")
|
||||
.replace("\r", ""),
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user