mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(core): update error wording for invalid version field (#14800)
* fix(core): update error wording for invalid version field fixes #14799 * fmt
This commit is contained in:
@@ -3164,18 +3164,20 @@ impl<'d> serde::Deserialize<'d> for PackageVersion {
|
|||||||
})?;
|
})?;
|
||||||
Ok(PackageVersion(
|
Ok(PackageVersion(
|
||||||
Version::from_str(version)
|
Version::from_str(version)
|
||||||
.map_err(|_| DeError::custom("`package > version` must be a semver string"))?
|
.map_err(|_| {
|
||||||
|
DeError::custom("`tauri.conf.json > version` must be a semver string")
|
||||||
|
})?
|
||||||
.to_string(),
|
.to_string(),
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
Err(DeError::custom(
|
Err(DeError::custom(
|
||||||
"`package > version` value is not a path to a JSON object",
|
"`tauri.conf.json > version` value is not a path to a JSON object",
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ok(PackageVersion(
|
Ok(PackageVersion(
|
||||||
Version::from_str(value)
|
Version::from_str(value)
|
||||||
.map_err(|_| DeError::custom("`package > version` must be a semver string"))?
|
.map_err(|_| DeError::custom("`tauri.conf.json > version` must be a semver string"))?
|
||||||
.to_string(),
|
.to_string(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user