mirror of
https://github.com/ellie/atuin.git
synced 2024-09-11 21:18:22 +03:00
chore: test using new config changes
This commit is contained in:
parent
f2c1922e48
commit
f1deca0a94
@ -22,7 +22,7 @@ uuid = { version = "0.8", features = ["v4"] }
|
||||
indicatif = "0.16.2"
|
||||
whoami = "1.1.2"
|
||||
chrono-english = "0.1.4"
|
||||
config = "0.11"
|
||||
config = { git = "https://github.com/conradludgate/config-rs", branch = "absolute-path-current-dir" }
|
||||
serde_derive = "1.0.125"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.64"
|
||||
|
@ -120,7 +120,7 @@ impl Settings {
|
||||
|
||||
config_file.push("config.toml");
|
||||
|
||||
let mut s = Config::new();
|
||||
let mut s = Config::default();
|
||||
|
||||
let db_path = data_dir.join("history.db");
|
||||
let key_path = data_dir.join("key");
|
||||
@ -149,15 +149,15 @@ impl Settings {
|
||||
.wrap_err("could not load environment")?;
|
||||
|
||||
// all paths should be expanded
|
||||
let db_path = s.get_str("db_path")?;
|
||||
let db_path = s.get_string("db_path")?;
|
||||
let db_path = shellexpand::full(db_path.as_str())?;
|
||||
s.set("db_path", db_path.to_string())?;
|
||||
|
||||
let key_path = s.get_str("key_path")?;
|
||||
let key_path = s.get_string("key_path")?;
|
||||
let key_path = shellexpand::full(key_path.as_str())?;
|
||||
s.set("key_path", key_path.to_string())?;
|
||||
|
||||
let session_path = s.get_str("session_path")?;
|
||||
let session_path = s.get_string("session_path")?;
|
||||
let session_path = shellexpand::full(session_path.as_str())?;
|
||||
s.set("session_path", session_path.to_string())?;
|
||||
|
||||
|
@ -20,7 +20,7 @@ uuid = { version = "0.8", features = ["v4"] }
|
||||
indicatif = "0.16.2"
|
||||
whoami = "1.1.2"
|
||||
chrono-english = "0.1.4"
|
||||
config = "0.11"
|
||||
config = { git = "https://github.com/conradludgate/config-rs", branch = "absolute-path-current-dir" }
|
||||
serde_derive = "1.0.125"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.64"
|
||||
|
@ -34,7 +34,7 @@ impl Settings {
|
||||
|
||||
// create the config file if it does not exist
|
||||
|
||||
let mut s = Config::new();
|
||||
let mut s = Config::default();
|
||||
|
||||
if config_file.exists() {
|
||||
s.merge(ConfigFile::with_name(config_file.to_str().unwrap()))?;
|
||||
|
@ -114,7 +114,8 @@ impl Cmd {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let cwd = env::current_dir()?.display().to_string();
|
||||
let cwd = env::current_dir()
|
||||
.map_or_else(|_| String::new(), |cwd| cwd.display().to_string());
|
||||
|
||||
let h = History::new(chrono::Utc::now(), command, cwd, -1, -1, None, None);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user