Skip to content

Commit 9ca072e

Browse files
committed
enhance(cli): check mismatched packages in info
1 parent d293848 commit 9ca072e

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:enhance
3+
"@tauri-apps/cli": patch:enhance
4+
---
5+
6+
Check mismatched versions in `tauri info`

crates/tauri-cli/src/info/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,17 @@ pub fn command(options: Options) -> Result<()> {
318318
.extend(app::items(frontend_dir.as_ref(), tauri_dir.as_deref()));
319319

320320
environment.display();
321+
321322
packages.display();
323+
322324
plugins.display();
325+
326+
if let (Some(frontend_dir), Some(tauri_dir)) = (&frontend_dir, &tauri_dir) {
327+
if let Err(error) = plugins::check_mismatched_packages(frontend_dir, tauri_dir) {
328+
println!("\n{}: {error}", "Error".bright_red().bold());
329+
}
330+
}
331+
323332
app.display();
324333

325334
// iOS

crates/tauri-cli/src/info/plugins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,5 @@ pub fn check_mismatched_packages(frontend_dir: &Path, tauri_path: &Path) -> crat
163163
)
164164
.collect::<Vec<_>>()
165165
.join("\n");
166-
Err(Error::GenericError(format!("Found version mismatched Tauri packages. Make sure the NPM and crate versions are on the same major/minor releases:\n{mismatched_text}")))
166+
Err(Error::GenericError(format!("Found version mismatched Tauri packages. Make sure the NPM package and Rust crate versions are on the same major/minor releases:\n{mismatched_text}")))
167167
}

0 commit comments

Comments
 (0)