Skip to content

Commit acbdd2a

Browse files
authored
Properly display error messages from pip install commands (#8)
1 parent 63b78aa commit acbdd2a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2121

2222
***Fixed:***
2323

24+
- Properly display error messages from `pip install` commands
2425
- Fix project version reading for the Starship prompt hidden command on non-Windows systems
2526

2627
## 0.2.0 - 2023-05-07

src/commands/self_cmd/update.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ impl Cli {
4646
fs::remove_dir_all(&installation_directory).ok();
4747
}
4848

49-
println!("{}", String::from_utf8_lossy(&output.stdout));
49+
println!(
50+
"{}{}",
51+
String::from_utf8_lossy(&output.stdout),
52+
String::from_utf8_lossy(&output.stderr)
53+
);
5054
exit(output.status.code().unwrap_or(1));
5155
}
5256

src/distribution.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ pub fn install_project(installation_directory: &PathBuf, python: &PathBuf) -> Re
131131
let output = result?;
132132
if !output.status.success() {
133133
fs::remove_dir_all(installation_directory).ok();
134-
println!("{}", String::from_utf8_lossy(&output.stdout));
134+
println!(
135+
"{}{}",
136+
String::from_utf8_lossy(&output.stdout),
137+
String::from_utf8_lossy(&output.stderr)
138+
);
135139
exit(output.status.code().unwrap_or(1));
136140
}
137141

0 commit comments

Comments
 (0)