aboutsummaryrefslogtreecommitdiff
path: root/helix-loader
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-01-18 00:04:40 +0000
committerSkyler Hawthorne2022-06-19 03:54:03 +0000
commit502d3290fb88d8a871b0824adc7987a98104933d (patch)
tree5348192b2237e97f3bc0068503279760e8c187f5 /helix-loader
parent308cab3e5cd5e8d5a8c37498e725f51ab101a908 (diff)
improve test harness
* Use new macro syntax for encoding sequences of keys * Make convenience helpers for common test pattern * Use indoc for inline indented raw strings * Add feature flag for integration testing to disable rendering
Diffstat (limited to 'helix-loader')
-rw-r--r--helix-loader/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs
index 767bff7a..595ac7aa 100644
--- a/helix-loader/src/lib.rs
+++ b/helix-loader/src/lib.rs
@@ -11,17 +11,17 @@ pub fn runtime_dir() -> std::path::PathBuf {
return dir.into();
}
+ if let Ok(dir) = std::env::var("CARGO_MANIFEST_DIR") {
+ // this is the directory of the crate being run by cargo, we need the workspace path so we take the parent
+ return std::path::PathBuf::from(dir).parent().unwrap().join(RT_DIR);
+ }
+
const RT_DIR: &str = "runtime";
let conf_dir = config_dir().join(RT_DIR);
if conf_dir.exists() {
return conf_dir;
}
- if let Ok(dir) = std::env::var("CARGO_MANIFEST_DIR") {
- // this is the directory of the crate being run by cargo, we need the workspace path so we take the parent
- return std::path::PathBuf::from(dir).parent().unwrap().join(RT_DIR);
- }
-
// fallback to location of the executable being run
std::env::current_exe()
.ok()