Skip to content

Commit

Permalink
Merge pull request #27 from josh-richardson/fix-updater
Browse files Browse the repository at this point in the history
Fixes updater serializer
  • Loading branch information
AlexandrouR authored Dec 16, 2019
2 parents b28fbe0 + 08500bd commit b4b6185
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/org/web3j/console/config/CliConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ private static CliConfig initializeDefaultConfig(File configFile) throws IOExcep

private static CliConfig getSavedConfig(File configFile) throws IOException {
String configContents = new String(Files.readAllBytes(configFile.toPath()));
return new Gson().fromJson(configContents, CliConfig.class);
CliConfig config = new Gson().fromJson(configContents, CliConfig.class);
config.setVersion(Version.getVersion());
return config;
}

public static CliConfig getConfig(File configFile) throws IOException {
Expand Down Expand Up @@ -107,6 +109,10 @@ public static OS determineOS() {
}
}

public void setVersion(final String version) {
this.version = version;
}

private String version;
private String servicesUrl;
private String clientId;
Expand Down

0 comments on commit b4b6185

Please sign in to comment.