Skip to content

Commit

Permalink
enhance(cli): log message to inform user of DevCommand being used (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
3lpsy authored Jan 18, 2025
1 parent a70e690 commit 0b79af7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/log-dev-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---

Log the command used to start the rust app in development.
2 changes: 2 additions & 0 deletions crates/tauri-cli/src/interface/rust/desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub fn run_dev<F: Fn(Option<i32>, ExitReason) + Send + Sync + 'static>(
let manually_killed_app = Arc::new(AtomicBool::default());
let manually_killed_app_ = manually_killed_app.clone();

log::info!(action = "Running"; "DevCommand (`{} {}`)", &dev_cmd.get_program().to_string_lossy(), dev_cmd.get_args().map(|arg| arg.to_string_lossy()).fold(String::new(), |acc, arg| format!("{acc} {arg}")));

let dev_child = match SharedChild::spawn(&mut dev_cmd) {
Ok(c) => Ok(c),
Err(e) if e.kind() == ErrorKind::NotFound => Err(anyhow::anyhow!(
Expand Down

0 comments on commit 0b79af7

Please sign in to comment.