Allow toolchain paths to be wrapped in quotes

pull/10333/head
Brian Daniels 2019-04-05 14:47:02 -05:00
parent 71c84e851f
commit 632cd9d065
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)