diff --git a/tools/cli/Cargo.toml b/tools/cli/Cargo.toml index 617e0105f..989b2c71b 100644 --- a/tools/cli/Cargo.toml +++ b/tools/cli/Cargo.toml @@ -24,9 +24,12 @@ toml = "0.5.9" atty = "0.2.14" thiserror = "1.0.37" anyhow = "1.0.66" -check-latest = "1.0.1" +check-latest = { version = "1.0.1", optional = true } clap = "2.34.0" exitfailure = "0.5.1" serde = "1.0.147" serde_json = "1.0.89" termion = "1.5.6" + +[features] +check-latest = ["dep:check-latest"] diff --git a/tools/cli/src/main.rs b/tools/cli/src/main.rs index 58abbd83c..3ca0d23f1 100644 --- a/tools/cli/src/main.rs +++ b/tools/cli/src/main.rs @@ -70,6 +70,7 @@ pub fn main() -> Result<(), anyhow::Error> { return Ok(()); } + #[cfg(feature = "check-latest")] if let Ok(Some(new_version)) = check_latest::check_max!() { use termion::color; diff --git a/tools/repl/Cargo.toml b/tools/repl/Cargo.toml index fcb857c0f..bc3015162 100644 --- a/tools/repl/Cargo.toml +++ b/tools/repl/Cargo.toml @@ -22,7 +22,7 @@ serde_json = "1.0.89" wasmer-wasi = { package = "wasmer-wasi-fl", version = "0.17.1"} env_logger = "0.9.3" -check-latest = "1.0.1" +check-latest = { version = "1.0.1", optional = true } log = "0.4.17" rustyline = { version = "10.0.0", features = ["with-fuzzy"] } rustyline-derive = "0.7.0" @@ -30,3 +30,6 @@ rustop = "1.1.2" itertools = "0.10.5" uuid = { version = "1.2.2", features = ["v4"] } termion = "1.5.6" + +[features] +check-latest = ["dep:check-latest"] diff --git a/tools/repl/src/main.rs b/tools/repl/src/main.rs index aba84d24e..b519dd6c2 100644 --- a/tools/repl/src/main.rs +++ b/tools/repl/src/main.rs @@ -116,6 +116,7 @@ fn print_welcome_message() { color::Fg(color::Reset), ); + #[cfg(feature = "check-latest")] if let Ok(Some(new_version)) = check_latest::check_max!() { println!( "New version is available! {}{} -> {}{}",