File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ use std::process::{Command, ExitCode};
88fn main ( ) -> ExitCode {
99 let src_dir = Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
1010
11+ // Check if git is installed
12+ if Command :: new ( "git" ) . arg ( "--version" ) . status ( ) . is_err ( ) {
13+ eprintln ! ( "error: Git is not installed or could not be found." ) ;
14+ return ExitCode :: FAILURE ;
15+ }
16+
1117 // Update and init submodule
1218 if let Err ( error) = Command :: new ( "git" )
1319 . arg ( "submodule" )
@@ -16,7 +22,7 @@ fn main() -> ExitCode {
1622 . current_dir ( src_dir)
1723 . status ( )
1824 {
19- eprintln ! ( "{error}" ) ;
25+ eprintln ! ( "Failed to update MAVLink definitions submodule: {error}" ) ;
2026 return ExitCode :: FAILURE ;
2127 }
2228
@@ -32,7 +38,7 @@ fn main() -> ExitCode {
3238 . current_dir ( & mavlink_dir)
3339 . status ( )
3440 {
35- eprintln ! ( "{error}" ) ;
41+ eprintln ! ( "Failed to apply MAVLink definitions patches: {error}" ) ;
3642 return ExitCode :: FAILURE ;
3743 }
3844 }
You can’t perform that action at this time.
0 commit comments