Skip to content

Commit

Permalink
fix: ensure that version is not "latest" in node
Browse files Browse the repository at this point in the history
I saw this happen, this wont fix it but might make it a bit easier to spot
  • Loading branch information
jdx committed Sep 19, 2024
1 parent eed0ecf commit 0e196d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/core/node.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit 0e196d6

Please sign in to comment.