metadata: parse read-manifest directly
This commit is contained in:
parent
f1e1cd58a6
commit
7b93f1a01a
1 changed files with 1 additions and 4 deletions
|
@ -381,14 +381,11 @@ class Metadata:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def manifest(path, check=True):
|
def manifest(path, check=True):
|
||||||
manifest = {}
|
|
||||||
output = subprocess.run(
|
output = subprocess.run(
|
||||||
["cargo", "read-manifest", f"--manifest-path={path}"],
|
["cargo", "read-manifest", f"--manifest-path={path}"],
|
||||||
check=check, capture_output=True
|
check=check, capture_output=True
|
||||||
)
|
)
|
||||||
if not output.returncode:
|
return json.loads(output.stdout)
|
||||||
manifest = json.loads(output.stdout)
|
|
||||||
return manifest
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def metadata(path, deps=False):
|
def metadata(path, deps=False):
|
||||||
|
|
Loading…
Reference in a new issue