Merge pull request #10333 from bridadan/toolchain_path_quotes

Allow toolchain paths to be wrapped in quotes
pull/10354/head
Martin Kojtal 2019-04-09 11:00:43 +02:00 committed by GitHub
commit 905042ec17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -88,8 +88,10 @@ _ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'IAR_PATH', 'ARMC6_PATH']
for _n in _ENV_PATHS:
if getenv('MBED_'+_n):
if exists(getenv('MBED_'+_n)):
globals()[_n] = getenv('MBED_'+_n)
# It's common to provide paths with quotes for certain OSes
env_path = getenv('MBED_'+_n).strip("\"'")
if exists(env_path):
globals()[_n] = env_path
else:
print("WARNING: MBED_%s set as environment variable but doesn't"
" exist" % _n)