Skip to content

Commit 56bf1f2

Browse files
committed
Fix submodule init issues.
1 parent 5d609c6 commit 56bf1f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ui-sys/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ use std::process::Command;
88
fn main() {
99
// Update the submodule with libui if needed
1010
if !Path::new("libui/.git").exists() {
11-
Command::new("git").args(&["submodule", "update", "--init"]).status().unwrap();
11+
Command::new("git").args(&["version"]).status().expect("Git does not appear to be installed. Git is required to build ui-sys; install Git or build ui-sys independently. Error");
12+
Command::new("git").args(&["submodule", "update", "--init"]).status().expect("Unable to update Git submodules. Error");
13+
} else {
14+
Command::new("git").args(&["submodule", "update", "--recursive"]).status().expect("Unable to update Git submodules. Error");
1215
}
1316

1417
let target = env::var("TARGET").unwrap();

0 commit comments

Comments
 (0)