Skip to content

Commit 62eb940

Browse files
committed
Fixed consistency between 'mbed new' and 'mbed import' to respect the existence of .mbed file
1 parent c458ad9 commit 62eb940

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

mbed/mbed.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636

3737
# Application version
38-
ver = '0.8.2'
38+
ver = '0.8.3'
3939

4040
# Default paths to Mercurial and Git
4141
hg_cmd = 'hg'
@@ -1458,10 +1458,11 @@ def new(name, scm='git', program=False, library=False, mbedlib=False, create_onl
14581458
p_path = Repo.findparent(d_path) or d_path
14591459
if program and library:
14601460
error("Cannot use both --program and --library options.", 1)
1461-
elif not program and not library:
1462-
d_type = 'library' if os.path.abspath(p_path) != os.path.abspath(d_path) else 'program'
1463-
else:
1461+
elif program or library:
14641462
d_type = 'library' if library else 'program'
1463+
else:
1464+
p = Program(d_path)
1465+
d_type = 'library' if p and not p.is_cwd and os.path.abspath(p_path) != os.path.abspath(d_path) else 'program'
14651466

14661467
if scm and scm != 'none':
14671468
if os.path.isdir(d_path) and Repo.isrepo(d_path):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def read(fname):
1919
setup(
2020
name="mbed-cli",
2121
packages=["mbed"],
22-
version="0.8.2",
22+
version="0.8.3",
2323
url='http://github.com/ARMmbed/mbed-cli',
2424
author='ARM mbed',
2525
author_email='[email protected]',

0 commit comments

Comments
 (0)