mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Windows: Compiler wasn't supplying Windows command line with the correct double quotes
This commit is contained in:
@ -54,7 +54,7 @@ import processing.app.preproc.PdePreprocessor;
|
|||||||
import processing.app.legacy.PApplet;
|
import processing.app.legacy.PApplet;
|
||||||
import processing.app.packages.LegacyUserLibrary;
|
import processing.app.packages.LegacyUserLibrary;
|
||||||
import processing.app.packages.UserLibrary;
|
import processing.app.packages.UserLibrary;
|
||||||
import processing.app.tools.ArgumentsWithSpaceAwareCommandLine;
|
import processing.app.tools.DoubleQuotedArgumentsOnWindowsCommandLine;
|
||||||
|
|
||||||
public class Compiler implements MessageConsumer {
|
public class Compiler implements MessageConsumer {
|
||||||
|
|
||||||
@ -723,7 +723,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
CommandLine commandLine = new ArgumentsWithSpaceAwareCommandLine(command[0]);
|
CommandLine commandLine = new DoubleQuotedArgumentsOnWindowsCommandLine(command[0]);
|
||||||
for (int i = 1; i < command.length; i++) {
|
for (int i = 1; i < command.length; i++) {
|
||||||
commandLine.addArgument(command[i], false);
|
commandLine.addArgument(command[i], false);
|
||||||
}
|
}
|
||||||
|
@ -7,24 +7,24 @@ import processing.app.helpers.OSUtils;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
public class ArgumentsWithSpaceAwareCommandLine extends CommandLine {
|
public class DoubleQuotedArgumentsOnWindowsCommandLine extends CommandLine {
|
||||||
|
|
||||||
public ArgumentsWithSpaceAwareCommandLine(String executable) {
|
public DoubleQuotedArgumentsOnWindowsCommandLine(String executable) {
|
||||||
super(executable);
|
super(executable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArgumentsWithSpaceAwareCommandLine(File executable) {
|
public DoubleQuotedArgumentsOnWindowsCommandLine(File executable) {
|
||||||
super(executable);
|
super(executable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArgumentsWithSpaceAwareCommandLine(CommandLine other) {
|
public DoubleQuotedArgumentsOnWindowsCommandLine(CommandLine other) {
|
||||||
super(other);
|
super(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommandLine addArgument(String argument, boolean handleQuoting) {
|
public CommandLine addArgument(String argument, boolean handleQuoting) {
|
||||||
if (argument.contains(" ") && OSUtils.isWindows()) {
|
if (argument.contains("\"") && OSUtils.isWindows()) {
|
||||||
argument = argument.replaceAll("\"", "").replaceAll("'", "");
|
argument = argument.replace("\"", "\\\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.addArgument(argument, handleQuoting);
|
return super.addArgument(argument, handleQuoting);
|
Reference in New Issue
Block a user