Volshell: Sync errors with the CLI concerning unsatisfied requirements

Fixes #607
This commit is contained in:
Mike Auty
2021-12-31 00:55:23 +00:00
parent 571ab8f659
commit ac7127d05a
+6 -1
View File
@@ -238,9 +238,14 @@ class VolShell(cli.CommandLine):
vollog.debug("Writing out configuration data to config.json")
with open("config.json", "w") as f:
json.dump(dict(constructed.build_configuration()), f, sort_keys = True, indent = 2)
except exceptions.UnsatisfiedException as excp:
self.process_unsatisfied_exceptions(excp)
parser.exit(1, f"Unable to validate the plugin requirements: {[x for x in excp.unsatisfied]}\n")
try:
# Construct and run the plugin
constructed.run()
if constructed:
constructed.run()
except exceptions.VolatilityException as excp:
self.process_exceptions(excp)
parser.exit(1, f"Unable to validate the plugin requirements: {[x for x in excp.unsatisfied]}\n")