Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Better
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jun 28, 2023
1 parent 19d0267 commit 5893f62
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,16 @@ pub fn run() -> Result<()> {
set_default_ss58_version(chain_spec);
ensure_dev(chain_spec).map_err(Error::Other)?;

return runner.sync_run(|config| {
cmd.run::<service::Block, ()>(config).map_err(|e| Error::SubstrateCli(e))
})
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| {
cmd.run::<service::Block, ()>(config)
.map_err(|e| Error::SubstrateCli(e))
})
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
.into())
}
},
BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| {
cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())
Expand Down

0 comments on commit 5893f62

Please sign in to comment.