Clean up a few extra analytics code paths
This was leftover from
@@ -18,8 +18,6 @@ use tempfile;
/// The default root path of the Habitat filesystem
pub const ROOT_PATH: &str = "hab";
-/// The default path for any analytics related files
-pub const CACHE_ANALYTICS_PATH: &str = "hab/cache/analytics";
/// The default download root path for package artifacts, used on package installation
pub const CACHE_ARTIFACT_PATH: &str = "hab/cache/artifacts";
/// The default path where cryptographic keys are stored
@@ -68,17 +66,6 @@ lazy_static::lazy_static! {
static ref EUID: u32 = users::get_effective_uid();
- static ref MY_CACHE_ANALYTICS_PATH: PathBuf = {
- if am_i_root() {
- PathBuf::from(CACHE_ANALYTICS_PATH)
- } else {
- match dirs::home_dir() {
- Some(home) => home.join(format!(".{}", CACHE_ANALYTICS_PATH)),
- None => PathBuf::from(CACHE_ANALYTICS_PATH),
- }
- }
- };
-
static ref MY_CACHE_ARTIFACT_PATH: PathBuf = {
if am_i_root() {
PathBuf::from(CACHE_ARTIFACT_PATH)
@@ -124,16 +111,6 @@ lazy_static::lazy_static! {
};
}
-/// Returns the path to the analytics cache, optionally taking a custom filesystem root.
-pub fn cache_analytics_path<T>(fs_root_path: Option<T>) -> PathBuf
- where T: AsRef<Path>
-{
- match fs_root_path {
- Some(fs_root_path) => fs_root_path.as_ref().join(&*MY_CACHE_ANALYTICS_PATH),
- None => Path::new(&*FS_ROOT_PATH).join(&*MY_CACHE_ANALYTICS_PATH),
- }
-}
-
/// Returns the path to the artifacts cache, optionally taking a custom filesystem root.
pub fn cache_artifact_path<T>(fs_root_path: Option<T>) -> PathBuf
where T: AsRef<Path>
