Skip to content

Commit

Permalink
Address review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaMadhushan committed Aug 22, 2024
1 parent deaff8e commit 51e7a8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class ToolUtil {
public static final String LATEST_PULL_INPUT = "latest";
public static final boolean TEST_MODE = Boolean.parseBoolean(
System.getenv("TEST_MODE_ACTIVE"));
public static final String DEFAULT_BALLERINA_VERSION = "0.0.0";

/**
* Provides used Ballerina version.
Expand All @@ -95,7 +96,7 @@ public static String getCurrentBallerinaVersion() {
}
String ballerinaVersionFilePath = OSUtils.getBallerinaVersionFilePath();
if (!new File(ballerinaVersionFilePath).exists()) {
String defaultBallerinaVersion = "0.0.0";
String defaultBallerinaVersion = DEFAULT_BALLERINA_VERSION;
setCurrentBallerinaVersion(defaultBallerinaVersion);
setInstallerVersion(installerVersionFilePath);
}
Expand All @@ -119,7 +120,7 @@ public static String getCurrentInstalledBallerinaVersion() {
return getVersion(OSUtils.getInstalledConfigPath());
} catch (IOException e) {
//If we files does not exist it will be empty and update tool continues without a distribution
return "0.0.0";
return DEFAULT_BALLERINA_VERSION;
}
}

Expand Down

0 comments on commit 51e7a8e

Please sign in to comment.