fix(cli): read existing jwt instead of recreating (#2096)

This commit is contained in:
Roman Krasiuk
2023-04-03 22:30:04 +03:00
committed by GitHub
parent 4cc808f8b2
commit e2a1df10d1

View File

@ -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)
}
}
}
}