mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Handle first part for package name
This commit is contained in:
@ -622,7 +622,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
|
|||||||
_url = _url[:-1]
|
_url = _url[:-1]
|
||||||
name = basename(_url)
|
name = basename(_url)
|
||||||
if "." in name and not name.startswith("."):
|
if "." in name and not name.startswith("."):
|
||||||
name = name.rsplit(".", 1)[0]
|
name = name.split(".", 1)[0]
|
||||||
|
|
||||||
return (name or text, requirements, url)
|
return (name or text, requirements, url)
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ def test_pkg_input_parser():
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
"https://somedomain.com/path/LibraryName-1.2.3.zip",
|
"https://somedomain.com/path/LibraryName-1.2.3.zip",
|
||||||
("LibraryName-1.2.3", None,
|
("LibraryName-1", None,
|
||||||
"https://somedomain.com/path/LibraryName-1.2.3.zip")
|
"https://somedomain.com/path/LibraryName-1.2.3.zip")
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -69,12 +69,12 @@ def test_pkg_input_parser():
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
"https://github.com/user/package/archive/branch.tar.gz",
|
"https://github.com/user/package/archive/branch.tar.gz",
|
||||||
("branch.tar", None,
|
("branch", None,
|
||||||
"https://github.com/user/package/archive/branch.tar.gz")
|
"https://github.com/user/package/archive/branch.tar.gz")
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"https://github.com/user/package/archive/branch.tar.gz@!=5",
|
"https://github.com/user/package/archive/branch.tar.gz@!=5",
|
||||||
("branch.tar", "!=5",
|
("branch", "!=5",
|
||||||
"https://github.com/user/package/archive/branch.tar.gz")
|
"https://github.com/user/package/archive/branch.tar.gz")
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user