Skip to content

Commit 256822b

Browse files
committedJan 10, 2025
Improve error when n2/ninja missing
1 parent 3bdf61e commit 256822b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎build/runner/src/build.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ pub fn run_build(args: BuildArgs) {
7777
}
7878

7979
// run build
80-
let mut status = command.status().expect("ninja not installed");
80+
let Ok(mut status) = command.status() else {
81+
panic!("\nn2 and ninja missing/failed. did you forget 'bash tools/install-n2'?");
82+
};
8183
if !status.success() && Instant::now().duration_since(start_time).as_secs() < 3 {
8284
// if the build fails quickly, there's a reasonable chance that build.ninja
8385
// references a file that has been renamed/deleted. We currently don't

‎docs/linux.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,10 @@ Users on ARM64, see the notes at the bottom of this file before proceeding.
1919
**Ensure some basic tools are installed**:
2020

2121
```
22-
$ sudo apt install bash grep findutils curl gcc g++ make git rsync ninja-build
22+
$ sudo apt install bash grep findutils curl gcc g++ make git rsync
2323
```
2424

2525
- The 'find' utility is 'findutils' on Debian.
26-
- Your distro may call the package 'ninja' instead of 'ninja-build', or it
27-
may not have a version new enough - if so, install from the zip mentioned in
28-
development.md.
2926

3027
## Missing Libraries
3128

0 commit comments

Comments
 (0)
Please sign in to comment.