Impeove invalid config_file_path handling

1. Besides opt.config_file_path, also consider MEILI_CONFIG_FILE_PATH in the Err path because they are both user input.
2. Print out the incorrect file path in error message.
3. Add tests
https://github.com/meilisearch/meilisearch/pull/2804#discussion_r991999888
This commit is contained in:
Lawrence Chou
2022-10-12 11:58:28 +08:00
parent 91accc0194
commit 3c3ae3ff98
3 changed files with 49 additions and 8 deletions

View File

@ -89,6 +89,7 @@ manifest-dir-macros = "0.1.16"
maplit = "1.0.2"
urlencoding = "2.1.2"
yaup = "0.2.1"
temp-env = "0.3.1"
[features]
default = ["analytics", "meilisearch-lib/default", "mini-dashboard"]