metadata: parse read-manifest directly

This commit is contained in:
Alberto Planas 2020-10-13 19:03:32 +02:00
parent f1e1cd58a6
commit 7b93f1a01a

View file

@ -381,14 +381,11 @@ class Metadata:
@staticmethod
def manifest(path, check=True):
manifest = {}
output = subprocess.run(
["cargo", "read-manifest", f"--manifest-path={path}"],
check=check, capture_output=True
)
if not output.returncode:
manifest = json.loads(output.stdout)
return manifest
return json.loads(output.stdout)
@staticmethod
def metadata(path, deps=False):