Unverified Commit b66483bc authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

CLI: Add missing feature checking and check if someone passes a file (#3283)

parent e0050b28
Pipeline #142889 canceled with stages
in 16 minutes and 41 seconds
......@@ -82,7 +82,7 @@ impl SubstrateCli for Cli {
#[cfg(feature = "kusama-native")]
"kusama-staging" => Box::new(service::chain_spec::kusama_staging_testnet_config()?),
#[cfg(not(feature = "kusama-native"))]
name if name.starts_with("kusama-") =>
name if name.starts_with("kusama-") && !name.ends_with(".json") =>
Err(format!("`{}` only supported with `kusama-native` feature enabled.", name))?,
"polkadot" => Box::new(service::chain_spec::polkadot_config()?),
"polkadot-dev" | "dev" => Box::new(service::chain_spec::polkadot_development_config()?),
......@@ -95,7 +95,8 @@ impl SubstrateCli for Cli {
"rococo-local" => Box::new(service::chain_spec::rococo_local_testnet_config()?),
#[cfg(feature = "rococo-native")]
"rococo-staging" => Box::new(service::chain_spec::rococo_staging_testnet_config()?),
name if name.starts_with("rococo-") =>
#[cfg(not(feature = "rococo-native"))]
name if name.starts_with("rococo-") && !name.ends_with(".json") =>
Err(format!("`{}` only supported with `rococo-native` feature enabled.", name))?,
"westend" => Box::new(service::chain_spec::westend_config()?),
#[cfg(feature = "westend-native")]
......@@ -105,7 +106,7 @@ impl SubstrateCli for Cli {
#[cfg(feature = "westend-native")]
"westend-staging" => Box::new(service::chain_spec::westend_staging_testnet_config()?),
#[cfg(not(feature = "westend-native"))]
name if name.starts_with("westend-") =>
name if name.starts_with("westend-") && !name.ends_with(".json") =>
Err(format!("`{}` only supported with `westend-native` feature enabled.", name))?,
"wococo" => Box::new(service::chain_spec::wococo_config()?),
#[cfg(feature = "rococo-native")]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment