forked from platformio/platformio-core
Fixed a "ValueError: Invalid simple block" when uninstalling a package with a custom name and external source // Resolve #3816
This commit is contained in:
1 parent
dd4fff3a79
commit
4012a86cac
5 files changed
+31
-21
No files matched your search
@@ -18,11 +18,10 @@ from platformio.package.meta import PackageSpec
|
||||
|
||||
class PlatformPackagesMixin(object):
|
||||
def get_package_spec(self, name, version=None):
|
||||
version = version or self.packages[name].get("version")
|
||||
if version and any(c in version for c in (":", "/", "@")):
|
||||
return PackageSpec("%s=%s" % (name, version))
|
||||
return PackageSpec(
|
||||
owner=self.packages[name].get("owner"), name=name, requirements=version
|
||||
owner=self.packages[name].get("owner"),
|
||||
name=name,
|
||||
requirements=version or self.packages[name].get("version"),
|
||||
)
|
||||
|
||||
def get_package(self, name, spec=None):
|
||||
|
||||
Reference in new issue
Block a user