From 0e196d6d9c0b0851148ba9894191d766c0386356 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdx@users.noreply.github.com> Date: Thu, 19 Sep 2024 07:47:45 -0500 Subject: [PATCH] fix: ensure that version is not "latest" in node I saw this happen, this wont fix it but might make it a bit easier to spot --- src/plugins/core/node.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/core/node.rs b/src/plugins/core/node.rs index daba1a050..d48a8ad61 100644 --- a/src/plugins/core/node.rs +++ b/src/plugins/core/node.rs @@ -1,7 +1,7 @@ use std::collections::BTreeMap; use std::path::{Path, PathBuf}; -use eyre::{bail, Result}; +use eyre::{bail, ensure, Result}; use serde_derive::Deserialize; use tempfile::tempdir_in; use url::Url; @@ -324,6 +324,10 @@ impl Backend for NodePlugin { } fn install_version_impl(&self, ctx: &InstallContext) -> Result<()> { + ensure!( + ctx.tv.version != "latest", + "version should not be 'latest' for node, something is wrong" + ); let config = Config::get(); let settings = Settings::get(); let opts = BuildOpts::new(ctx)?;