mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix lib update crashing when no libs are installed (resolve issue #19)
This commit is contained in:
@ -6,6 +6,7 @@ Release History
|
||||
|
||||
* Fixed bug with order for includes in conversation from INO/PDE to CPP
|
||||
* Automatic detection of port on upload (`issue #15 <https://github.com/ivankravets/platformio/issues/15>`_)
|
||||
* Fixed lib update crashing when no libs are installed (`issue #19 <https://github.com/ivankravets/platformio/issues/19>`_)
|
||||
|
||||
|
||||
0.7.0 (2014-09-24)
|
||||
|
@ -140,9 +140,12 @@ def lib_show(name):
|
||||
@cli.command("update", short_help="Update installed libraries")
|
||||
def lib_update():
|
||||
lm = LibraryManager(get_lib_dir())
|
||||
lib_names = lm.get_installed()
|
||||
versions = get_api_result("/lib/version/" + ",".join(lib_names))
|
||||
|
||||
lib_names = lm.get_installed()
|
||||
if not lib_names:
|
||||
return
|
||||
|
||||
versions = get_api_result("/lib/version/" + ",".join(lib_names))
|
||||
for name in lib_names:
|
||||
info = lm.get_info(name)
|
||||
|
||||
|
@ -33,6 +33,8 @@ class LibraryManager(object):
|
||||
|
||||
def get_installed(self):
|
||||
items = []
|
||||
if not isdir(self.lib_dir):
|
||||
return items
|
||||
for item in listdir(self.lib_dir):
|
||||
conf_path = join(self.lib_dir, item, self.CONFIG_NAME)
|
||||
if isfile(conf_path):
|
||||
|
Reference in New Issue
Block a user