Skip to content

Commit

Permalink
fix: do not use @file with jshell. Fixes quarkusio#1349 (quarkusio#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxandersen authored Apr 30, 2022
1 parent 018acde commit 59b5483
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ public BaseCmdGenerator(RunContext ctx) {
public String generate() throws IOException {
List<String> fullArgs = generateCommandLineList();
String args = String.join(" ", escapeOSArguments(fullArgs, shell));
// Check if we need to use @-files on Windows
// Check if we can and need to use @-files on Windows
boolean useArgsFile = false;
if (args.length() > COMMAND_LINE_LENGTH_LIMIT && Util.getShell() != Util.Shell.bash) {
if (!(getCode().isJShell() || ctx.isForceJsh()) &&
args.length() > COMMAND_LINE_LENGTH_LIMIT && Util.getShell() != Util.Shell.bash) {
// @file is only available from java 9 onwards.
String requestedJavaVersion = ctx.getJavaVersion() != null ? ctx.getJavaVersion()
: getCode().getJavaVersion().orElse(null);
Expand Down

0 comments on commit 59b5483

Please sign in to comment.