mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
CLI: Add missing feature checking and check if someone passes a file (#3283)
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user