-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
70 changed files
with
1,116 additions
and
1,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
cli/src/main/java/com/devonfw/tools/ide/cli/CliProcessException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.devonfw.tools.ide.cli; | ||
|
||
import com.devonfw.tools.ide.process.ProcessResult; | ||
|
||
/** | ||
* {@link CliException} that is thrown if a process failed (external tool executed) but we assume this is an error of the end-user. | ||
* | ||
* @see com.devonfw.tools.ide.process.ProcessErrorHandling#THROW_CLI | ||
*/ | ||
public final class CliProcessException extends CliException { | ||
|
||
private final ProcessResult processResult; | ||
|
||
/** | ||
* The constructor. | ||
*/ | ||
public CliProcessException(String message, ProcessResult processResult) { | ||
|
||
super(message, processResult.getExitCode()); | ||
this.processResult = processResult; | ||
} | ||
|
||
/** | ||
* @return the {@link ProcessResult}. | ||
*/ | ||
public ProcessResult getProcessResult() { | ||
|
||
return this.processResult; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
cli/src/main/java/com/devonfw/tools/ide/process/EnvironmentContextEmpty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.devonfw.tools.ide.process; | ||
|
||
import java.nio.file.Path; | ||
|
||
/** | ||
* Empty implementation of {@link EnvironmentContext} used to prevent {@link NullPointerException}s. | ||
*/ | ||
class EnvironmentContextEmpty implements EnvironmentContext { | ||
|
||
static final EnvironmentContextEmpty INSTANCE = new EnvironmentContextEmpty(); | ||
|
||
private EnvironmentContextEmpty() { | ||
super(); | ||
} | ||
|
||
@Override | ||
public EnvironmentContext withEnvVar(String key, String value) { | ||
|
||
return this; | ||
} | ||
|
||
@Override | ||
public EnvironmentContext withPathEntry(Path path) { | ||
|
||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.