Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/devonfw#139-…
Browse files Browse the repository at this point in the history
…feature-for-making-symlinks-relative

# Conflicts:
#	cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java
  • Loading branch information
MattesMrzik committed Nov 29, 2023
2 parents 75eb709 + 489c8d6 commit 0719c4f
Show file tree
Hide file tree
Showing 47 changed files with 1,150 additions and 1,611 deletions.
33 changes: 33 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/cli/CliArgument.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,37 @@ public static CliArgument of(boolean splitShortOpt, String... args) {
return first;
}

/**
* @param firstArgs the first arguments.
* @param nextArgs the additional arguments to append after {@code args}.
* @return a {@link String} array with the values from {@code firstArgs} followed by the values from {@code nextArgs}.
*/
public static String[] append(String[] firstArgs, String... nextArgs) {

return join(firstArgs, false, nextArgs);
}

/**
* @param nextArgs the arguments to append after {@code firstArgs}.
* @param firstArgs the first arguments.
* @return a {@link String} array with the values from {@code firstArgs} followed by the values from {@code nextArgs}.
*/
public static String[] prepend(String[] nextArgs, String... firstArgs) {

return join(nextArgs, false, firstArgs);
}

private static String[] join(String[] args, boolean prefix, String... extraArgs) {

String[] result = new String[args.length + extraArgs.length];
int argsStart = 0;
int extraArgsStart = args.length;
if (prefix) {
argsStart = extraArgs.length;
extraArgsStart = 0;
}
System.arraycopy(args, 0, result, argsStart, args.length);
System.arraycopy(extraArgs, 0, result, extraArgsStart, extraArgs.length);
return result;
}
}
2 changes: 1 addition & 1 deletion cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public int run(String... args) {
} catch (CliException error) {
exitStatus = error.getExitCode();
if (context().level(IdeLogLevel.DEBUG).isEnabled()) {
context().error(error.getMessage(), error);
context().error(error, error.getMessage());
} else {
context().error(error.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
public final class HelpCommandlet extends Commandlet {

protected static final String LOGO = """
static final String LOGO = """
__ ___ ___ ___
╲ ╲ |_ _| ╲| __|__ _ ____ _
> > | || |) | _|/ _` (_-< || |
Expand Down
80 changes: 0 additions & 80 deletions cli/src/main/java/com/devonfw/tools/ide/configurator/Args.java

This file was deleted.

Loading

0 comments on commit 0719c4f

Please sign in to comment.