Skip to content

Commit 59292d2

Browse files
authored
Merge pull request #904 from AaronErhardt/master
build-tools: Fix reporting of errors
2 parents b103fd7 + c85950c commit 59292d2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

glib-build-tools/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ pub fn compile_resources<P: AsRef<Path>>(source_dir: P, gresource: &str, target:
1919
let out_dir = env::var("OUT_DIR").unwrap();
2020
let out_dir = Path::new(&out_dir);
2121

22-
let status = Command::new("glib-compile-resources")
22+
let output = Command::new("glib-compile-resources")
2323
.arg("--sourcedir")
2424
.arg(source_dir.as_ref())
2525
.arg("--target")
2626
.arg(out_dir.join(target))
2727
.arg(gresource)
28-
.status()
28+
.output()
2929
.unwrap();
3030

3131
assert!(
32-
status.success(),
33-
"glib-compile-resources failed with exit status {status}",
32+
output.status.success(),
33+
"glib-compile-resources failed with exit status {} and stderr:\n{}",
34+
output.status,
35+
String::from_utf8_lossy(&output.stderr)
3436
);
3537

3638
println!("cargo:rerun-if-changed={gresource}");

0 commit comments

Comments
 (0)