Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn main() {
.to_string();

let zig = env::var("ZIG").unwrap_or_else(|_| "zig".into());
let mut command = Command::new(zig);
let mut command = Command::new(&zig);
command
.arg("build")
.arg("-Demit-lib-vt")
Expand All @@ -74,7 +74,18 @@ fn main() {
let status = command
.current_dir(&vendored_dir)
.status()
.expect("failed to execute zig build for vendored libghostty-vt");
.unwrap_or_else(|err| {
if err.kind() == std::io::ErrorKind::NotFound {
panic!(
"zig executable not found (looked for {zig:?}; set the ZIG \
environment variable to point at the zig binary). Building \
the vendored libghostty-vt requires Zig 0.15.2: on macOS run \
`brew install zig@0.15`, elsewhere install it from \
https://ziglang.org/download/, then retry the build"
);
}
panic!("failed to execute zig build for vendored libghostty-vt: {err}");
});
assert!(
status.success(),
"zig build for vendored libghostty-vt failed: {status}"
Expand Down
Loading