Skip to content

Commit 130e88b

Browse files
committed
set TOP before processing --add-path
fix regression in dffe32c
1 parent 20f8e05 commit 130e88b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cue.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@ def setup_for_build(args):
764764
if re.match('^test-results:', line):
765765
has_test_results = True
766766

767+
# apparently %CD% is handled automagically, so use getcwd() instead
768+
os.environ['TOP'] = os.getcwd()
769+
767770
addpaths = []
768771
for path in args.paths:
769772
try:
@@ -775,6 +778,8 @@ def setup_for_build(args):
775778

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

781+
# os.environ completely updated at this point
782+
778783
logger.debug('Final PATH')
779784
for loc in os.environ['PATH'].split(os.pathsep):
780785
logger.debug(' %r', loc)
@@ -784,9 +789,6 @@ def setup_for_build(args):
784789
is_make3 = True
785790
logger.debug('Check if make is a 3.x series: %s', is_make3)
786791

787-
# apparently %CD% is handled automagically
788-
os.environ['TOP'] = os.getcwd()
789-
790792
# Add EXTRA make arguments
791793
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
792794
val = os.environ.get(tag, "")

0 commit comments

Comments
 (0)