diff --git a/docs/faq.md b/docs/faq.md index ad23d982e1..64f7c7a9fc 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -24,15 +24,6 @@ something with the aliasing is acting up, submit a ticket or just stick to using Under the hood, when mise reads a config file or takes CLI input it will swap out "nodejs" and "golang". -While this change is rolling out, there is some migration code that will move installs/plugins from -the "nodejs" and "golang" directories to the new names. If this runs for you you'll see a message -but it should not run again unless there is some kind of problem. In this case, it's probably -easiest to just -run -`rm -rf ~/.local/share/mise/installs/{golang,nodejs} ~/.local/share/mise/plugins/{golang,nodejs}`. - -Once most users have migrated over this migration code will be removed. - ## What does `mise activate` do? It registers a shell hook to run `mise hook-env` every time the shell prompt is displayed. diff --git a/src/migrate.rs b/src/migrate.rs index 301496f8ab..bac3b1510b 100644 --- a/src/migrate.rs +++ b/src/migrate.rs @@ -7,8 +7,6 @@ use eyre::Result; pub async fn run() { tokio::join!( - task(|| rename_plugin("nodejs", "node")), - task(|| rename_plugin("golang", "go")), task(migrate_trusted_configs), task(migrate_tracked_configs), task(|| remove_deprecated_plugin("node", "rtx-nodejs")), @@ -25,31 +23,6 @@ async fn task(job: impl FnOnce() -> Result<()> + Send + 'static) { } } -fn move_subdirs(from: &Path, to: &Path) -> Result<()> { - if from.exists() { - eprintln!("migrating {} to {}", from.display(), to.display()); - file::create_dir_all(to)?; - for f in from.read_dir()? { - let f = f?.file_name(); - let from_file = from.join(&f); - let to_file = to.join(&f); - if !to_file.exists() { - eprintln!("moving {} to {}", from_file.display(), to_file.display()); - file::rename(from_file, to_file)?; - } - } - file::remove_all(from)?; - } - - Ok(()) -} - -fn rename_plugin(from: &str, to: &str) -> Result<()> { - move_subdirs(&INSTALLS.join(from), &INSTALLS.join(to))?; - move_subdirs(&PLUGINS.join(from), &PLUGINS.join(to))?; - Ok(()) -} - fn migrate_tracked_configs() -> Result<()> { move_dirs(&DATA.join("tracked_config_files"), &TRACKED_CONFIGS)?; move_dirs(&DATA.join("tracked-config-files"), &TRACKED_CONFIGS)?;