mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(cli): read existing jwt instead of recreating (#2096)
This commit is contained in:
@ -105,7 +105,11 @@ impl RpcServerArgs {
|
||||
None => {
|
||||
let default_path = PlatformPath::<JwtSecretPath>::default();
|
||||
let fpath = default_path.as_ref();
|
||||
JwtSecret::try_create(fpath)
|
||||
if fpath.exists() {
|
||||
JwtSecret::from_file(fpath)
|
||||
} else {
|
||||
JwtSecret::try_create(fpath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user