cli: read config only when use the make command

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-03 23:51:13 +03:00
parent bba79b915b
commit 7fbedf684e
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -136,10 +136,10 @@ pub fn run() -> Result<(), Box<dyn std::error::Error>> {
} else { } else {
current_dir()? current_dir()?
}; };
let config = read_config(&current_dir)?;
match args.command { match args.command {
Command::Make(_make_args) => { Command::Make(_make_args) => {
let config = read_config(&current_dir)?;
let mut make_files: HashMap<String, String> = HashMap::new(); let mut make_files: HashMap<String, String> = HashMap::new();
if let Some(cfg) = config.direnv { if let Some(cfg) = config.direnv {