Skip to content

Commit c8cc406

Browse files
authored
Merge pull request #412 from bridadan/fix_export_args
Requiring -i for 'mbed export'
2 parents bcc9bbb + 053a4a7 commit c8cc406

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mbed/mbed.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,12 +2345,16 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
23452345
target = program.get_target(target)
23462346
macros = program.get_macros()
23472347

2348+
if not ide:
2349+
error('Please specify ide using the -i switch')
2350+
23482351
if not source or len(source) == 0:
23492352
source = [os.path.relpath(program.path, orig_path)]
23502353

23512354
popen(['python', '-u', os.path.join(tools_dir, 'project.py')]
23522355
+ list(chain.from_iterable(izip(repeat('-D'), macros)))
2353-
+ (['-i', ide.lower(), '-m', target] if ide else [])
2356+
+ ['-i', ide.lower()]
2357+
+ ['-m', target]
23542358
+ (['-c'] if clean else [])
23552359
+ list(chain.from_iterable(izip(repeat('--source'), source)))
23562360
+ args,

0 commit comments

Comments
 (0)