Skip to content

Commit f7ec105

Browse files
author
jantje
committed
#1143 for non board files only ignore lines starting with #
1 parent 93efab8 commit f7ec105

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

io.sloeber.core/src/io/sloeber/core/tools/Helpers.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ private static void setTheEnvironmentVariablesAddAFile(IContributedEnvironment c
518518
/**
519519
* This method parses a file with environment variables like the platform.txt
520520
* file for values to be added to the environment variables
521+
* Ignore lines starting with #
521522
*
522523
* @param contribEnv
523524
* @param confDesc
@@ -532,10 +533,8 @@ private static void setTheEnvironmentVariablesAddAFile(String prefix, IContribut
532533

533534
// Read File Line By Line
534535
while ((strLine = br.readLine()) != null) {
535-
// Ignore everything after first #
536-
String realData[] = strLine.split("#");
537-
if (realData.length > 0) {
538-
String var[] = realData[0].split("=", 2);
536+
if (!strLine.startsWith("#")) {
537+
String var[] = strLine.split("=", 2);
539538
if (var.length == 2) {
540539
String value = var[1].trim();
541540
setBuildEnvironmentVariable(contribEnv, confDesc, MakeKeyString(prefix, var[0]),

0 commit comments

Comments
 (0)