Commit 40b01049 authored by zeroleak's avatar zeroleak
Browse files

(--init) preserve apiKey when already defined

parent 7b8281e8
......@@ -149,8 +149,12 @@ public class CliConfigService {
throw new NotifiableException("Invalid mnemonic");
}
// generate apiKey
String apiKey = CliUtils.generateUniqueString();
// preserve apiKey when already defined
String apiKey = cliConfig.getApiKey();
if (StringUtils.isEmpty(apiKey)) {
// generate apiKey when missing
apiKey = CliUtils.generateUniqueString();
}
// save configuration file
Properties props = new Properties();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment