mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
Do not ignore non-existent BAT_CONFIG_PATH
Do not ignore `BAT_CONFIG_PATH` if it doesn't exist. Both when generating a new config file with `--generate-config-file` and when attempting to read the config. Also, provide a better error message in case the file can not be created. closes #1550
This commit is contained in:
1 parent
2aa3ed9da8
commit
ca60937c2e
3 files changed
+17
-3
No files matched your search
@@ -652,6 +652,13 @@ fn config_location_test() {
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("bat.conf\n");
|
||||
|
||||
bat_with_config()
|
||||
.env("BAT_CONFIG_PATH", "not-existing.conf")
|
||||
.arg("--config-file")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("not-existing.conf\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user