File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,36 @@ fn main() {
44
44
. arg ( "--libdir=lib" )
45
45
. arg ( & out_dir)
46
46
. arg ( "vendor" )
47
- . status ( )
48
- . expect ( "This crate requires meson (and ninja) to be installed: https://mesonbuild.com/" ) ;
49
- assert ! ( s. success( ) , "meson failed" ) ;
47
+ . status ( ) ;
48
+ match s {
49
+ Ok ( s) => if !s. success ( ) {
50
+ println ! ( "cargo:warning=Meson build failed. See error log for details" ) ;
51
+ std:: process:: exit ( 1 ) ;
52
+ }
53
+ Err ( err) => {
54
+ println ! ( "cargo:warning=This crate requires meson (and ninja) to be installed: https://mesonbuild.com/" ) ;
55
+ println ! ( "cargo:warning=meson: {err}" ) ;
56
+ std:: process:: exit ( 2 ) ;
57
+ }
58
+ }
50
59
51
60
eprintln ! ( "Installing dav1d into {:?}" , install_dir) ;
52
61
let s = Command :: new ( "ninja" )
53
62
. env ( "DESTDIR" , & install_dir)
54
63
. current_dir ( & out_dir)
55
64
. arg ( "install" )
56
- . status ( )
57
- . expect ( "This crate requires ninja to be installed: https://ninja-build.org/" ) ;
58
- assert ! ( s. success( ) , "ninja failed" ) ;
65
+ . status ( ) ;
66
+ match s {
67
+ Ok ( s) => if !s. success ( ) {
68
+ println ! ( "cargo:warning=ninja build failed. See error log for details" ) ;
69
+ std:: process:: exit ( 1 ) ;
70
+ }
71
+ Err ( err) => {
72
+ println ! ( "cargo:warning=This crate requires ninja to be installed: https://ninja-build.org/" ) ;
73
+ println ! ( "cargo:warning=ninja: {err}" ) ;
74
+ std:: process:: exit ( 2 ) ;
75
+ }
76
+ }
59
77
60
78
let target_os = env:: var ( "CARGO_CFG_TARGET_OS" ) . unwrap ( ) ;
61
79
let target_env = env:: var ( "CARGO_CFG_TARGET_ENV" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments