Skip to content

Fixed consistency between 'mbed new' and 'mbed import' #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


# Application version
ver = '0.8.2'
ver = '0.8.3'

# Default paths to Mercurial and Git
hg_cmd = 'hg'
Expand Down Expand Up @@ -1458,10 +1458,11 @@ def new(name, scm='git', program=False, library=False, mbedlib=False, create_onl
p_path = Repo.findparent(d_path) or d_path
if program and library:
error("Cannot use both --program and --library options.", 1)
elif not program and not library:
d_type = 'library' if os.path.abspath(p_path) != os.path.abspath(d_path) else 'program'
else:
elif program or library:
d_type = 'library' if library else 'program'
else:
p = Program(d_path)
d_type = 'library' if p and not p.is_cwd and os.path.abspath(p_path) != os.path.abspath(d_path) else 'program'

if scm and scm != 'none':
if os.path.isdir(d_path) and Repo.isrepo(d_path):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def read(fname):
setup(
name="mbed-cli",
packages=["mbed"],
version="0.8.2",
version="0.8.3",
url='http://github.com/ARMmbed/mbed-cli',
author='ARM mbed',
author_email='[email protected]',
Expand Down