Skip to content

Commit df02aa2

Browse files
author
jantje
committed
#1390 remove \"@{build.opt.path}\ froml the command line
1 parent 7088916 commit df02aa2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

io.sloeber.core/src/io/sloeber/core/txt/WorkAround.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828

2929
/**
3030
* A class to apply workarounds to installed packages. Workaround are done after
31-
* installation and at usage of boards.txt or platform.txt file currently there
32-
* are noworkarounds for programmers.trx
31+
* installation on boards.txt or platform.txt programmers.txt files
32+
* Sloeber creates boards.sloeber.txt or platform.sloeber.txt
33+
* programmers.sloeber.txt files
34+
*
35+
* Sloeber tries to minimize workarounds in the code
3336
*
3437
* The first line of the worked around files contain a key. A newer version of
3538
* sloeber that has a different workaround should change the key. This way the
@@ -42,9 +45,7 @@
4245
public class WorkAround extends Const {
4346
// Each time this class is touched consider changing the String below to enforce
4447
// updates
45-
// for debugging I added the system time so the files get refresed at each run
46-
private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.04.test 02 ";
47-
// + String.valueOf(System.currentTimeMillis());
48+
private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.04.test 03 ";
4849

4950
/**
5051
* workarounds done at installation time. I try to keep those at a minimum but
@@ -268,6 +269,9 @@ private static String platformApplyCustomWorkArounds(String inPlatformTxt) {
268269
platformTXT = platformTXT.replace(" -DVARIANT_H=\"{build.variant_h}\"",
269270
" \"-DVARIANT_H=\\\"{build.variant_h}\\\"\"");
270271

272+
// for ESP32 remove the build options fix for arduino ide #1390
273+
platformTXT = platformTXT.replace(" \"@{build.opt.path}\" ", " ");
274+
271275
return platformTXT;
272276
}
273277

@@ -366,9 +370,9 @@ private static String platformApplyStandardWorkArounds(String inPlatformTxt) {
366370
while (regex_macher.find()) {
367371
String origLine = platformTXT.substring(regex_macher.start(), regex_macher.end());
368372
String workedAroundLine = origLine.replace("(?:", "(");
369-
String badSuffix="\\s+([0-9]+).*";
370-
if(workedAroundLine.endsWith(badSuffix)) {
371-
workedAroundLine=workedAroundLine.substring(0, workedAroundLine.length()-badSuffix.length());
373+
String badSuffix = "\\s+([0-9]+).*";
374+
if (workedAroundLine.endsWith(badSuffix)) {
375+
workedAroundLine = workedAroundLine.substring(0, workedAroundLine.length() - badSuffix.length());
372376
}
373377
if (!origLine.equals(workedAroundLine)) {
374378
replaceInfo.put(origLine, workedAroundLine);

0 commit comments

Comments
 (0)