From bbcea1f5e8e1e047ed1f505a4dbd6ec742174d90 Mon Sep 17 00:00:00 2001 From: xeodus Date: Wed, 30 Jul 2025 14:53:54 +0530 Subject: [PATCH] fix(cli): improve error messages regarding cargo metadata command (#13918) --- crates/tauri-cli/src/interface/rust.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tauri-cli/src/interface/rust.rs b/crates/tauri-cli/src/interface/rust.rs index dc8a47582..98d32ddfb 100644 --- a/crates/tauri-cli/src/interface/rust.rs +++ b/crates/tauri-cli/src/interface/rust.rs @@ -1183,7 +1183,7 @@ pub(crate) fn get_cargo_target_dir(args: &[String]) -> crate::Result { std::env::current_dir()?.join(target) } else { get_cargo_metadata() - .with_context(|| "failed to get cargo metadata")? + .with_context(|| "failed to run 'cargo metadata' command to get target directory")? .target_directory }; @@ -1221,7 +1221,7 @@ fn get_cargo_option<'a>(args: &'a [String], option: &'a str) -> Option<&'a str> pub fn get_workspace_dir() -> crate::Result { Ok( get_cargo_metadata() - .context("failed to get cargo metadata")? + .context("failed to run 'cargo metadata' command to get workspace directory")? .workspace_root, ) }