Skip to content

Commit 1c2a60a

Browse files
authored
#942: Added check for existence of devon.properties file (#953)
1 parent 26fe264 commit 1c2a60a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.devonfw.tools.ide.commandlet;
22

3+
import java.nio.file.Files;
34
import java.nio.file.Path;
45

56
import com.devonfw.tools.ide.context.IdeContext;
@@ -42,7 +43,7 @@ private void logSettingsLegacyStatus() {
4243
boolean hasLegacyProperties = false;
4344
while (variables != null) {
4445
Path legacyProperties = variables.getLegacyPropertiesFilePath();
45-
if (legacyProperties != null) {
46+
if (legacyProperties != null && Files.exists(legacyProperties)) {
4647
hasLegacyProperties = true;
4748
this.context.warning("Found legacy properties {}", legacyProperties);
4849
}
@@ -80,7 +81,7 @@ private void logOnlineStatus() {
8081
this.context.warning("You are offline. Check your internet connection and potential proxy settings.");
8182
}
8283
}
83-
84+
8485
@Override
8586
public boolean isIdeRootRequired() {
8687

0 commit comments

Comments
 (0)