Skip to content

Commit

Permalink
set TOP before processing --add-path
Browse files Browse the repository at this point in the history
fix regression in dffe32c
  • Loading branch information
mdavidsaver committed Nov 6, 2023
1 parent 20f8e05 commit 130e88b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cue.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ def setup_for_build(args):
if re.match('^test-results:', line):
has_test_results = True

# apparently %CD% is handled automagically, so use getcwd() instead
os.environ['TOP'] = os.getcwd()

addpaths = []
for path in args.paths:
try:
Expand All @@ -775,6 +778,8 @@ def setup_for_build(args):

os.environ['PATH'] = os.pathsep.join([os.environ['PATH']] + addpaths)

# os.environ completely updated at this point

logger.debug('Final PATH')
for loc in os.environ['PATH'].split(os.pathsep):
logger.debug(' %r', loc)
Expand All @@ -784,9 +789,6 @@ def setup_for_build(args):
is_make3 = True
logger.debug('Check if make is a 3.x series: %s', is_make3)

# apparently %CD% is handled automagically
os.environ['TOP'] = os.getcwd()

# Add EXTRA make arguments
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
val = os.environ.get(tag, "")
Expand Down

0 comments on commit 130e88b

Please sign in to comment.