Skip to content

Commit

Permalink
#1060: ide status runs correct in folder c:/projects (d:/project) (#1064
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hj-lorenz authored Feb 24, 2025
1 parent f164fda commit 26864ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public void run() {
logSettingsGitStatus();
logSettingsLegacyStatus();
logMigrationStatus();
new IdeasyCommandlet(this.context, null).checkIfUpdateIsAvailable();
}
new IdeasyCommandlet(this.context, null).checkIfUpdateIsAvailable();
}

private void logSettingsLegacyStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ private String getMessageIdeHomeFound() {
return "IDE environment variables have been set for " + this.ideHome + " in workspace " + this.workspaceName;
}

private String getMessageIdeHomeNotFound() {
private String getMessageNotInsideIdeProject() {

return "You are not inside an IDE installation: " + this.cwd;
return "You are not inside an IDE project: " + this.cwd;
}

private String getMessageIdeRootNotFound() {
Expand Down Expand Up @@ -738,7 +738,7 @@ public void logIdeHomeAndRootStatus() {
success("IDE_ROOT is set to {}", this.ideRoot);
}
if (this.ideHome == null) {
warning(getMessageIdeHomeNotFound());
warning(getMessageNotInsideIdeProject());
} else {
success("IDE_HOME is set to {}", this.ideHome);
}
Expand Down Expand Up @@ -918,7 +918,7 @@ private ValidationResult applyAndRun(CliArguments arguments, Commandlet cmd) {
if (result.isValid()) {
debug("Running commandlet {}", cmd);
if (cmd.isIdeHomeRequired() && (this.ideHome == null)) {
throw new CliException(getMessageIdeHomeNotFound(), ProcessResult.NO_IDE_HOME);
throw new CliException(getMessageNotInsideIdeProject(), ProcessResult.NO_IDE_HOME);
} else if (cmd.isIdeRootRequired() && (this.ideRoot == null)) {
throw new CliException(getMessageIdeRootNotFound(), ProcessResult.NO_IDE_ROOT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public void testStatusOutsideOfHome() {
context.run(args);

//assert
assertThat(context).logAtWarning().hasMessageContaining("You are not inside an IDE installation: ");
assertThat(context).logAtWarning().hasMessageContaining("You are not inside an IDE project: ");
}
}

0 comments on commit 26864ea

Please sign in to comment.