Stop copying updated pyproject/python pin on startup

The 'latest' and 'choose version' paths always read from the the
dist file these days, so the file doesn't need to be copied in advance.
The other reason for the current behaviour was so that when the user
manually installs a new launcher, it opens into the launcher on next
run, as that's probably what the user wanted. But this causes problems
when the launcher is updated automatically by things like homebrew.

https://forums.ankiweb.net/t/anki-homebrew-issues-terminal-and-crash-on-exit/64413/4
This commit is contained in:
Damien Elmes 2025-07-25 15:38:18 +07:00
parent 20b7bb66db
commit 177c483398

View file

@ -11,7 +11,6 @@ use std::time::SystemTime;
use std::time::UNIX_EPOCH;
use anki_io::copy_file;
use anki_io::copy_if_newer;
use anki_io::create_dir_all;
use anki_io::modified_time;
use anki_io::read_file;
@ -120,13 +119,8 @@ fn run() -> Result<()> {
return Ok(());
}
// Create install directory and copy project files in
// Create install directory
create_dir_all(&state.uv_install_root)?;
copy_if_newer(&state.dist_pyproject_path, &state.user_pyproject_path)?;
copy_if_newer(
&state.dist_python_version_path,
&state.user_python_version_path,
)?;
let launcher_requested = state.launcher_trigger_file.exists();