forked from platformio/platformio-core
Implemented new commands: list, show, uninstall & update; minor improvements to code
This commit is contained in:
1 parent
bddb9237e2
commit
027c3d0e5e
9 files changed
+192
-38
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
from click import argument, command, secho
|
||||
|
||||
from platformio.exception import PlatformNotInstalledYet
|
||||
from platformio.pkgmanager import PackageManager
|
||||
from platformio.platforms._base import PlatformFactory
|
||||
|
||||
|
||||
@command("uninstall", short_help="Uninstall the platforms")
|
||||
@argument("platform")
|
||||
def cli(platform):
|
||||
|
||||
if platform not in PackageManager.get_installed():
|
||||
raise PlatformNotInstalledYet(platform)
|
||||
|
||||
p = PlatformFactory().newPlatform(platform)
|
||||
if p.uninstall():
|
||||
secho("The platform '%s' has been successfully "
|
||||
"uninstalled!" % platform, fg="green")
|
||||
Reference in new issue
Block a user