set TOP before processing --add-path

fix regression in dffe32c23e
This commit is contained in:
Michael Davidsaver
2023-11-05 18:57:59 -08:00
parent 20f8e05393
commit 130e88b709

8
cue.py
View File

@@ -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:
@@ -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)
@@ -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, "")