Rename refresh to remap-binaries

feature/lookup-installed
trivernis 1 year ago
parent a081ea88de
commit 1ac8eec5f3
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -28,10 +28,12 @@ pub enum Command {
#[command()]
Default(DefaultArgs),
/// Refreshes the node environment mappings and cache.
/// This will erase all binary mappings not relevant to the current node version.
/// Creates wrapper scripts for node binaries
/// so they can be found in the path and are executed
/// with the correct node version. This will delete
/// all binary wrappers that don't apply to the active node version.
#[command()]
Refresh,
RemapBinaries,
/// Lists all available versions
#[command(name = "list-versions")]

@ -45,7 +45,7 @@ async fn main() -> Result<()> {
process::exit(exit_code);
}
args::Command::Refresh => nenv.refresh().await,
args::Command::RemapBinaries => nenv.remap().await,
args::Command::ListVersions => nenv.list_versions().await,
args::Command::Init => nenv.init_nenv().await,
_ => xkcd_unreachable!(),

@ -101,8 +101,7 @@ impl Nenv {
/// Clears the version cache and remaps all executables
#[tracing::instrument(skip(self))]
pub async fn refresh(&mut self) -> Result<()> {
Self::clear_version_cache().await?;
pub async fn remap(&mut self) -> Result<()> {
self.get_mapper().await?.remap().await
}

Loading…
Cancel
Save