1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-14 08:03:09 +03:00

SAM boards stop compiling due to way of handling params with spaces on different OSs. Fixed

This commit is contained in:
Federico Fissore
2015-04-13 12:05:00 +02:00
parent 4c9e5fc564
commit c740f251f4
2 changed files with 39 additions and 6 deletions

View File

@@ -0,0 +1,32 @@
package processing.app.tools;
import org.apache.commons.exec.CommandLine;
import processing.app.BaseNoGui;
import processing.app.Platform;
import processing.app.helpers.OSUtils;
import java.io.File;
public class ArgumentsWithSpaceAwareCommandLine extends CommandLine {
public ArgumentsWithSpaceAwareCommandLine(String executable) {
super(executable);
}
public ArgumentsWithSpaceAwareCommandLine(File executable) {
super(executable);
}
public ArgumentsWithSpaceAwareCommandLine(CommandLine other) {
super(other);
}
@Override
public CommandLine addArgument(String argument, boolean handleQuoting) {
if (argument.contains(" ") && OSUtils.isWindows()) {
argument = argument.replaceAll("\"", "").replaceAll("'", "");
}
return super.addArgument(argument, handleQuoting);
}
}