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:
Daniel Rainer
2025-10-01 01:19:33 +02:00
committed by Johannes Altmanninger
parent 62543b36a4
commit c145ee6df3

View File

@@ -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.