Skip to content

Commit

Permalink
Fix issue with chplconfig not supporting variables with equals signs (#…
Browse files Browse the repository at this point in the history
…26178)

Fixes an issue where if a `chplconfig` file has a variable with a value
that contains an equals sign, it will break with an error like `Warning:
Syntax Error: $CHPL_HOME/chplconfig:line`.

This resolves an issue a user saw on a system where
`--gcc-toolchain=...` was apart of the definition for
`CHPL_TARGET_CC/CXX`

[Reviewed by @e-kayrakli]
  • Loading branch information
jabraham17 authored Oct 30, 2024
2 parents 182bf38 + a492534 commit e75e707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/chplenv/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def parse(self):
if self.skip_line(line, linenum):
continue

var, val = [f.strip() for f in line.split('=')]
var, val = [f.strip() for f in line.split('=', maxsplit=1)]
self.chplconfig[var] = val

def skip_line(self, line, linenum):
Expand All @@ -198,7 +198,7 @@ def skip_line(self, line, linenum):

# Check for syntax errors
try:
var, val = [f.strip() for f in line.split('=')]
var, val = [f.strip() for f in line.split('=', maxsplit=1)]
except ValueError:
self.warnings.append(
(
Expand Down

0 comments on commit e75e707

Please sign in to comment.