mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix symlink package spec validation (#4870)
When validating symlink:// packages, use the specified symlink path, the same as for file:// packages. This fixes missing symlink packages in 'pkg list' and reinstalling on every build.
This commit is contained in:
@ -281,9 +281,16 @@ class BasePackageManager( # pylint: disable=too-many-public-methods,too-many-in
|
||||
# external "URL" mismatch
|
||||
if spec.external:
|
||||
# local folder mismatch
|
||||
if os.path.abspath(spec.uri) == os.path.abspath(pkg.path) or (
|
||||
spec.uri.startswith("file://")
|
||||
and os.path.abspath(pkg.path) == os.path.abspath(spec.uri[7:])
|
||||
if (
|
||||
os.path.abspath(spec.uri) == os.path.abspath(pkg.path)
|
||||
or (
|
||||
spec.uri.startswith("file://")
|
||||
and os.path.abspath(pkg.path) == os.path.abspath(spec.uri[7:])
|
||||
)
|
||||
or (
|
||||
spec.uri.startswith("symlink://")
|
||||
and os.path.abspath(pkg.path) == os.path.abspath(spec.uri[10:])
|
||||
)
|
||||
):
|
||||
return True
|
||||
if spec.uri != pkg.metadata.spec.uri:
|
||||
|
Reference in New Issue
Block a user