feat(path): include portable mode flag

This commit is contained in:
Federico Terzi 2021-06-27 15:45:40 +02:00
parent 887dfa2d5c
commit 5abf2419e1

View File

@ -28,6 +28,8 @@ pub struct Paths {
pub config: PathBuf, pub config: PathBuf,
pub runtime: PathBuf, pub runtime: PathBuf,
pub packages: PathBuf, pub packages: PathBuf,
pub is_portable_mode: bool,
} }
pub fn resolve_paths( pub fn resolve_paths(
@ -75,10 +77,13 @@ pub fn resolve_paths(
packages_dir packages_dir
}; };
let is_portable_mode = is_portable_mode() && force_config_dir.is_none() && force_runtime_dir.is_none();
Paths { Paths {
config: config_dir, config: config_dir,
runtime: runtime_dir, runtime: runtime_dir,
packages: packages_dir, packages: packages_dir,
is_portable_mode,
} }
} }