Skip to content

Commit 46596bb

Browse files
committed
Improved mbed tools detection (#158)
1 parent 1cb9339 commit 46596bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mbed/mbed.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,8 +1122,13 @@ def get_os_dir(self):
11221122
# Gets mbed tools dir (unified)
11231123
def get_tools_dir(self):
11241124
mbed_os_path = self.get_os_dir()
1125+
# mbed-os dir identified and tools is a sub dir
11251126
if mbed_os_path and os.path.isdir(os.path.join(mbed_os_path, 'tools')):
11261127
return os.path.join(mbed_os_path, 'tools')
1128+
# mbed-os not identified but tools found under cwd/tools
1129+
elif os.path.isdir(os.path.join(self.path, 'tools')):
1130+
return os.path.join(self.path, 'tools')
1131+
# mbed Classic deployed tools
11271132
elif os.path.isdir(os.path.join(self.path, '.temp', 'tools')):
11281133
return os.path.join(self.path, '.temp', 'tools')
11291134
else:

0 commit comments

Comments
 (0)