summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 853b9a7d..1028fc3a 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,6 +1,6 @@
use std::collections::{HashMap, HashSet};
use std::ffi::OsString;
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
use bat::assets::HighlightingAssets;
use clap::{ColorChoice, CommandFactory, FromArgMatches, Parser};
@@ -1142,7 +1142,8 @@ impl Opt {
if let Some(path) = matches.get_one::<String>("config") {
if !path.is_empty() {
- final_config = Some(GitConfig::try_create_from_path(&env, path));
+ let path = Path::new(path);
+ final_config = Some(GitConfig::from_path(&env, path, true));
}
}