mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 09:36:53 +00:00
fix(cli): change Cargo.toml version check to debug log (#14468)
This commit is contained in:
parent
f855caf8a3
commit
79a7d9ec01
5
.changes/version-req-error.md
Normal file
5
.changes/version-req-error.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
tauri-cli: patch:bug
|
||||
---
|
||||
|
||||
Fixed an issue that caused the cli to print errors like `Error Failed to parse version 2 for crate tauri` when there was no `Cargo.lock` file present yet. This will still be logged in `--verbose` mode.
|
||||
@ -72,7 +72,10 @@ pub fn installed_tauri_packages(
|
||||
crate_version(tauri_dir, manifest.as_ref(), lock.as_ref(), crate_name).version?;
|
||||
let crate_version = semver::Version::parse(&crate_version)
|
||||
.inspect_err(|_| {
|
||||
log::error!("Failed to parse version `{crate_version}` for crate `{crate_name}`");
|
||||
// On first run there's no lockfile yet so we get the version requirement from Cargo.toml.
|
||||
// In our templates that's `2` which is not a valid semver version but a version requirement.
|
||||
// log::error confused users so we use log::debug to still be able to see this error if needed.
|
||||
log::debug!("Failed to parse version `{crate_version}` for crate `{crate_name}`");
|
||||
})
|
||||
.ok()?;
|
||||
Some((crate_name.clone(), crate_version))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user