We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0adfd86 commit 39cfb35Copy full SHA for 39cfb35
client/src/config.rs
@@ -29,6 +29,19 @@ impl Config {
29
pub fn load(config_dir: Option<PathBuf>) -> anyhow::Result<Config> {
30
let mut conf_loader = HoconLoader::new();
31
32
+ let config_dir = config_dir.or_else(|| {
33
+ std::env::current_exe().ok().and_then(|p| {
34
+ p.parent().and_then(|p| {
35
+ let p = p.join("config.conf");
36
+ if p.exists() {
37
+ Some(p)
38
+ } else {
39
+ None
40
+ }
41
+ })
42
43
+ });
44
+
45
if let Some(config_dir) = config_dir {
46
conf_loader = conf_loader.load_file(config_dir)?;
47
}
client/src/index.d.ts
0 commit comments