mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03:00
Hide output of msgfmt -h
This command is only used to determine availability of `msgfmt`. Without these changes, the entire help output shows up if the code panics later on, which adds useless bloat to the output, making it harder to analyze what went wrong. Closes #11848
This commit is contained in:
committed by
Johannes Altmanninger
parent
c145ee6df3
commit
918e7abe6b
@@ -2,7 +2,7 @@
|
|||||||
env,
|
env,
|
||||||
ffi::OsStr,
|
ffi::OsStr,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
process::Command,
|
process::{Command, Stdio},
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@@ -34,7 +34,11 @@ fn embed_localizations(cache_dir: &Path) {
|
|||||||
// for the respective language.
|
// for the respective language.
|
||||||
let mut catalogs = phf_codegen::Map::new();
|
let mut catalogs = phf_codegen::Map::new();
|
||||||
|
|
||||||
match Command::new("msgfmt").arg("-h").status() {
|
match Command::new("msgfmt")
|
||||||
|
.arg("-h")
|
||||||
|
.stdout(Stdio::null())
|
||||||
|
.status()
|
||||||
|
{
|
||||||
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {
|
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {
|
||||||
rsconf::warn!(
|
rsconf::warn!(
|
||||||
"Cannot find msgfmt to build gettext message catalogs. Localization will not work."
|
"Cannot find msgfmt to build gettext message catalogs. Localization will not work."
|
||||||
|
|||||||
Reference in New Issue
Block a user