mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 04:03:52 +03:00
fix(core): Conf parsing error always displays tauri.conf.json
file name even when using toml or json5 (#10404)
* Conf parsing error displays `tauri.conf.json` when using toml or json5 Conf parsing error always displays `tauri.conf.json` as path, even when using `Tauri.toml` or `tauri.conf.json5` Example Error Message when using Tauri.toml: Error unable to parse toml Tauri config file at /Users/bla/repo/bla/bla/src-tauri/tauri.conf.json because invalid TOML value, did you mean to use a quoted string? at line 41 column 7 * merge changefile pr into main pr * Update and rename fix-conf-parsing-error-filepath to fix-conf-parsing-error-filepath.md --------- Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
This commit is contained in:
parent
2a402b4845
commit
498f405ca8
7
.changes/fix-conf-parsing-error-filepath.md
Normal file
7
.changes/fix-conf-parsing-error-filepath.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri-utils": "patch:bug"
|
||||
---
|
||||
|
||||
Fixed an issue where configuration parsing errors always displayed 'tauri.conf.json' as the file path, even when using 'Tauri.toml' or 'tauri.conf.json5'.
|
||||
|
||||
The error messages now correctly shows the actual config file being used.
|
@ -300,7 +300,7 @@ fn do_parse<D: DeserializeOwned>(
|
||||
#[cfg(feature = "config-json5")]
|
||||
{
|
||||
let raw = read_to_string(&json5)?;
|
||||
do_parse_json5(&raw, &path).map(|config| (config, json5))
|
||||
do_parse_json5(&raw, &json5).map(|config| (config, json5))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "config-json5"))]
|
||||
@ -312,7 +312,7 @@ fn do_parse<D: DeserializeOwned>(
|
||||
#[cfg(feature = "config-toml")]
|
||||
{
|
||||
let raw = read_to_string(&toml)?;
|
||||
do_parse_toml(&raw, &path).map(|config| (config, toml))
|
||||
do_parse_toml(&raw, &toml).map(|config| (config, toml))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "config-toml"))]
|
||||
|
Loading…
Reference in New Issue
Block a user