From b20624808540335cc950a5f7a4852edc4e842770 Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Tue, 28 Dec 2021 15:59:33 +0200 Subject: [PATCH] Don't warn on `~/.fnm` yet (#613) --- src/config.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/config.rs b/src/config.rs index 8fbdd82..9864ae7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,16 +1,11 @@ use crate::arch::Arch; use crate::log_level::LogLevel; -use crate::outln; use crate::path_ext::PathExt; use crate::version_file_strategy::VersionFileStrategy; -use colored::Colorize; use dirs::{data_dir, home_dir}; -use std::sync::atomic::{AtomicBool, Ordering}; use structopt::StructOpt; use url::Url; -static HAS_WARNED_DEPRECATED_BASE_DIR: AtomicBool = AtomicBool::new(false); - #[derive(StructOpt, Debug)] pub struct FnmConfig { /// https://nodejs.org/dist/ mirror @@ -124,24 +119,6 @@ impl FnmConfig { let modern = data_dir().map(|dir| dir.join("fnm")); if let Some(dir) = legacy { - if !HAS_WARNED_DEPRECATED_BASE_DIR.load(Ordering::SeqCst) { - HAS_WARNED_DEPRECATED_BASE_DIR.store(true, Ordering::SeqCst); - - let legacy_str = dir.display().to_string(); - let modern_str = modern.map_or("$XDG_DATA_HOME/fnm".to_string(), |path| { - path.display().to_string() - }); - - outln!( - self, Error, - "{}\n It looks like you have the {} directory on your disk.\n fnm is migrating its default storage location for application data to {}.\n You can read more about it here: {}\n", - "warning:".yellow().bold(), - legacy_str.italic(), - modern_str.italic(), - "https://github.com/schniz/fnm/issues/357".italic() - ); - } - return dir; }