From 7c305fb295e9051801d6c1c8a8b4909929c9baa8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 1 Apr 2024 15:18:47 -0700 Subject: [PATCH] nextcloud: Fail on errors when configuring the app Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/nextcloud/privileged.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plinth/modules/nextcloud/privileged.py b/plinth/modules/nextcloud/privileged.py index 4046ee277..0b3b6b18c 100644 --- a/plinth/modules/nextcloud/privileged.py +++ b/plinth/modules/nextcloud/privileged.py @@ -85,12 +85,13 @@ def setup(): _configure_systemd() -def _run_occ(*args, capture_output: bool = False): +def _run_occ(*args, capture_output: bool = False, + check: bool = True) -> subprocess.CompletedProcess: """Run the Nextcloud occ command inside the container.""" occ = [ 'podman', 'exec', '--user', 'www-data', CONTAINER_NAME, 'php', 'occ' ] + list(args) - return subprocess.run(occ, capture_output=capture_output, check=False) + return subprocess.run(occ, capture_output=capture_output, check=check) @privileged