review comments
This commit is contained in:
Generated
-1
@@ -7608,7 +7608,6 @@ dependencies = [
|
||||
"hex",
|
||||
"humantime 2.1.0",
|
||||
"humantime-serde",
|
||||
"lazy_static",
|
||||
"nix 0.27.1",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
|
||||
@@ -20,7 +20,6 @@ futures = { workspace = true }
|
||||
hex = "0.4.3"
|
||||
humantime = "2.1.0"
|
||||
humantime-serde = "1.1.1"
|
||||
lazy_static = { workspace = true }
|
||||
nix = { version = "0.27.1", features = ["signal", "fs"] }
|
||||
reqwest = { workspace = true, features = ["json", "stream"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
|
||||
@@ -5,10 +5,10 @@ use crate::config::{default_config_filepath, default_instances_directory, Config
|
||||
use crate::env::{setup_env, Env};
|
||||
use crate::error::NymvisorError;
|
||||
use clap::{Parser, Subcommand};
|
||||
use lazy_static::lazy_static;
|
||||
use nym_bin_common::bin_info;
|
||||
use nym_config::{DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::OnceLock;
|
||||
use tracing::{debug, error};
|
||||
|
||||
mod add_upgrade;
|
||||
@@ -19,13 +19,10 @@ pub(crate) mod helpers;
|
||||
mod init;
|
||||
mod run;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
|
||||
}
|
||||
|
||||
// Helper for passing LONG_VERSION to clap
|
||||
fn pretty_build_info_static() -> &'static str {
|
||||
&PRETTY_BUILD_INFORMATION
|
||||
static PRETTY_BUILD_INFORMATION: OnceLock<String> = OnceLock::new();
|
||||
PRETTY_BUILD_INFORMATION.get_or_init(|| bin_info!().pretty_print())
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
|
||||
@@ -37,7 +37,7 @@ pub(crate) fn execute(args: Args) -> Result<(), NymvisorError> {
|
||||
let rt = runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.expect("failed to create the runtime");
|
||||
.map_err(|source| NymvisorError::RuntimeCreationFailure { source })?;
|
||||
|
||||
// we have three tasks only:
|
||||
// - one for managing the daemon launcher
|
||||
|
||||
@@ -416,6 +416,9 @@ While the stored info point to:\n{stored_info:#?}"
|
||||
|
||||
#[error("could not load the default config file as there isn't a single nymvisor instance initiated (there are {instances}). please specify either $NYMVISOR_CONFIG_PATH or $NYMVISOR_ID")]
|
||||
NotSingleton { instances: usize },
|
||||
|
||||
#[error("failed to crate tokio's runtime: {source}")]
|
||||
RuntimeCreationFailure { source: io::Error },
|
||||
}
|
||||
|
||||
impl From<ExitStatus> for NymvisorError {
|
||||
|
||||
Reference in New Issue
Block a user