Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#739: removed "not inside an IDE installation message" #753

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,6 @@ private String getMessageIdeHomeFound() {
return "IDE environment variables have been set for " + this.ideHome + " in workspace " + this.workspaceName;
}

private String getMessageIdeHomeNotFound() {

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

private static String getMessageIdeRootNotFound() {
String root = System.getenv("IDE_ROOT");
if (root == null) {
Expand All @@ -277,10 +272,10 @@ private static String getMessageIdeRootNotFound() {
*/
public String getMessageIdeHome() {

if (this.ideHome == null) {
return getMessageIdeHomeNotFound();
if (this.ideHome != null) {
return getMessageIdeHomeFound();
}
return getMessageIdeHomeFound();
return null;
}
Comment on lines 273 to 279
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this method is not being used anymore. Can be removed I think.


/**
Expand Down Expand Up @@ -823,9 +818,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);
} else if (cmd.isIdeRootRequired() && (this.ideRoot == null)) {
if (cmd.isIdeRootRequired() && (this.ideRoot == null)) {
throw new CliException(getMessageIdeRootNotFound(), ProcessResult.NO_IDE_ROOT);
}
if (cmd.isProcessableOutput()) {
Expand Down
Loading