display error when hook fails
This commit is contained in:
@@ -308,7 +308,11 @@ class Domain(PrivateKey):
|
||||
def run_hooks(self) -> None:
|
||||
for hook in self.hooks:
|
||||
logging.info(f"Running hook: '{hook}'")
|
||||
subprocess.run(hook.split())
|
||||
hook_res = subprocess.run(hook.split(),
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.PIPE)
|
||||
if hook_res.returncode != 0:
|
||||
logging.error(f"Unable to run hook: {hook_res.stderr}")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user