Skip to content

Commit dad4f54

Browse files
authored
fix(cli): Disable version check, fixes #7273 (#7277)
1 parent df6712c commit dad4f54

2 files changed

Lines changed: 6 additions & 24 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'tauri-cli': 'patch:bug'
3+
'@tauri-apps/cli': 'patch:bug'
4+
---
5+
6+
Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues.

tooling/cli/src/dev.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ pub fn command(options: Options) -> Result<()> {
7474
let r = command_internal(options);
7575
if r.is_err() {
7676
kill_before_dev_process();
77-
#[cfg(not(debug_assertions))]
78-
let _ = check_for_updates();
7977
}
8078
r
8179
}
@@ -185,8 +183,6 @@ fn command_internal(mut options: Options) -> Result<()> {
185183

186184
let _ = ctrlc::set_handler(move || {
187185
kill_before_dev_process();
188-
#[cfg(not(debug_assertions))]
189-
let _ = check_for_updates();
190186
exit(130);
191187
});
192188
}
@@ -319,30 +315,10 @@ fn on_dev_exit(status: ExitStatus, reason: ExitReason, exit_on_panic: bool, no_w
319315
&& (exit_on_panic || matches!(reason, ExitReason::NormalExit)))
320316
{
321317
kill_before_dev_process();
322-
#[cfg(not(debug_assertions))]
323-
let _ = check_for_updates();
324318
exit(status.code().unwrap_or(0));
325319
}
326320
}
327321

328-
#[cfg(not(debug_assertions))]
329-
fn check_for_updates() -> Result<()> {
330-
if std::env::var_os("TAURI_SKIP_UPDATE_CHECK") != Some("true".into()) {
331-
let current_version = crate::info::cli_current_version()?;
332-
let current = semver::Version::parse(&current_version)?;
333-
334-
let upstream_version = crate::info::cli_upstream_version()?;
335-
let upstream = semver::Version::parse(&upstream_version)?;
336-
if current < upstream {
337-
println!(
338-
"🚀 A new version of Tauri CLI is available! [{}]",
339-
upstream.to_string()
340-
);
341-
};
342-
}
343-
Ok(())
344-
}
345-
346322
fn kill_before_dev_process() {
347323
if let Some(child) = BEFORE_DEV.get() {
348324
let child = child.lock().unwrap();

0 commit comments

Comments
 (0)