1
0
Fork 0
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:
Roman Zeyde 2021-11-08 06:40:32 +02:00 committed by GitHub
commit 29831558f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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"

View file

@ -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,