mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 13:51:12 -03:00
Check exit status of msgfmt
Prior to this, when `msgfmt` failed, this would be detected indirectly by the parser, which would then panic due to it input being empty. Explicit checking allows us to properly display `msgfmt`'s error message. Closes #11847
This commit is contained in:
committed by
Johannes Altmanninger
parent
62543b36a4
commit
c145ee6df3
@@ -97,6 +97,12 @@ fn embed_localizations(cache_dir: &Path) {
|
||||
.arg(&po_file_path)
|
||||
.output()
|
||||
.unwrap();
|
||||
if !output.status.success() {
|
||||
panic!(
|
||||
"msgfmt failed:\n{}",
|
||||
String::from_utf8(output.stderr).unwrap()
|
||||
);
|
||||
}
|
||||
let mo_data = output.stdout;
|
||||
|
||||
// Extract map from MO data.
|
||||
|
||||
Reference in New Issue
Block a user