Determine runtime dir based on executable location or env override.

This commit is contained in:
Blaž Hrastnik 2021-05-10 01:02:53 +09:00
parent d33e8fd3d8
commit 0f77f543e5
3 changed files with 16 additions and 1 deletions

View file

@ -63,7 +63,8 @@ fn read_query(language: &str, filename: &str) -> String {
static INHERITS_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r";+\s*inherits\s*:?\s*([a-z_,()]+)\s*").unwrap());
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let root = crate::runtime_dir();
// let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let path = root
.join("../runtime/queries")