diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 21f7360ad..72932abbf 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -65,6 +65,9 @@ pub mod prelude { pub fn test_init() -> impl ScopeGuarding { static DONE: OnceCell<()> = OnceCell::new(); DONE.get_or_init(|| { + // If we are building with `cargo build` and have build w/ `cmake`, FISH_BUILD_DIR might + // not yet exist. + std::fs::create_dir_all(env!("FISH_BUILD_DIR")).unwrap(); set_current_dir(env!("FISH_BUILD_DIR")).unwrap(); { let s = CString::new("").unwrap();