1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-27 17:41:42 +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:
David Peter
2021-02-27 12:21:06 +01:00
committed by David Peter
parent 2aa3ed9da8
commit ca60937c2e
3 changed files with 17 additions and 3 deletions
+7
View File
@@ -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]