diff --git a/polkadot/cli/src/command.rs b/polkadot/cli/src/command.rs index 3a245580de7d7676eb294746017ec8610ff7158b..3bcdd53e79137a10e61ec8ddbf07853fc23dfc2f 100644 --- a/polkadot/cli/src/command.rs +++ b/polkadot/cli/src/command.rs @@ -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")]