metadata: virtual manifest dont have JSON

This commit is contained in:
Alberto Planas 2021-03-26 14:13:45 +01:00
parent 653037692f
commit 1c2247ea93

View file

@ -386,7 +386,13 @@ class Metadata:
["cargo", "read-manifest", f"--manifest-path={path}"],
check=check, capture_output=True
)
return json.loads(output.stdout)
try:
result = json.loads(output.stdout)
except json.decoder.JSONDecodeError:
# Pure virtual manifest cannot be readed, we need to use
# one from the different workspaces
result = {}
return result
@staticmethod
def metadata(path, deps=False):