mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 06:57:53 +01:00
Merge pull request #612 from seberm/feature/version-argument
Add possibility to print out the program version without actually running it
This commit is contained in:
commit
29831558f7
2 changed files with 9 additions and 0 deletions
|
@ -108,6 +108,10 @@ doc = "Exit after the initial sync is over (don't start Electrum server)."
|
|||
name = "cache_merkle_proofs"
|
||||
doc = "Cache merkle proofs on subscription (if disabled, they are computed on demand)."
|
||||
|
||||
[[switch]]
|
||||
name = "version"
|
||||
doc = "Print out the program version."
|
||||
|
||||
[[param]]
|
||||
name = "index_lookup_limit"
|
||||
type = "usize"
|
||||
|
|
|
@ -308,6 +308,11 @@ impl Config {
|
|||
std::process::exit(1);
|
||||
}
|
||||
|
||||
if config.version {
|
||||
println!("v{}", ELECTRS_VERSION);
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
let config = Config {
|
||||
network: config.network,
|
||||
db_path: config.db_dir,
|
||||
|
|
Loading…
Add table
Reference in a new issue