Skip to content

Commit 9f409e7

Browse files
authored
feat: implement dynamic process detection and config management (#3)
* feat: implement dynamic process detection and config management * ci: fix clippy warning * ci: cargo fmt * chore: update config load, and fix regex error
1 parent 1a31bf4 commit 9f409e7

File tree

14 files changed

+1539
-462
lines changed

14 files changed

+1539
-462
lines changed

Cargo.lock

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ wait-timeout = "0.2.1"
1616
toml = "0.9.2"
1717
serde = { version = "1.0", features = ["derive"] }
1818
dirs = "6.0.0"
19+
regex = "1.11.1"
20+
once_cell = "1.21.3"

src/config.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ impl Config {
3636
// Try to load configuration dynamically, fall back to default if it fails
3737
let mut config = config_loader::load_config()
3838
.map(config_loader::to_app_config)
39-
.unwrap_or_else(|e| {
40-
eprintln!(
41-
"\x1b[31m Warning: Failed to load dynamic configuration: {e}. Using default configuration.\x1b[0m"
42-
);
43-
Self::default()
44-
});
39+
.unwrap_or_else(|_| Self::default());
4540

4641
// Allow environment variables to override config
4742
config.load_from_env();

0 commit comments

Comments
 (0)