Skip to content

Commit b4b6185

Browse files
authored
Merge pull request #27 from josh-richardson/fix-updater
Fixes updater serializer
2 parents b28fbe0 + 08500bd commit b4b6185

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/org/web3j/console/config/CliConfig.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ private static CliConfig initializeDefaultConfig(File configFile) throws IOExcep
4747

4848
private static CliConfig getSavedConfig(File configFile) throws IOException {
4949
String configContents = new String(Files.readAllBytes(configFile.toPath()));
50-
return new Gson().fromJson(configContents, CliConfig.class);
50+
CliConfig config = new Gson().fromJson(configContents, CliConfig.class);
51+
config.setVersion(Version.getVersion());
52+
return config;
5153
}
5254

5355
public static CliConfig getConfig(File configFile) throws IOException {
@@ -107,6 +109,10 @@ public static OS determineOS() {
107109
}
108110
}
109111

112+
public void setVersion(final String version) {
113+
this.version = version;
114+
}
115+
110116
private String version;
111117
private String servicesUrl;
112118
private String clientId;

0 commit comments

Comments
 (0)