From ac055c932e3fcbde640470ddc966c0f3f5241a13 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 13 Dec 2023 18:27:12 +0100 Subject: [PATCH] fix: remove bash/sh wrapping --- backupbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backupbot.py b/backupbot.py index 5244dfb..c6a4eaa 100755 --- a/backupbot.py +++ b/backupbot.py @@ -164,7 +164,7 @@ def run_commands(commands): if not command: continue # Remove bash/sh wrapping - command = command.removeprefix('bash -c').removeprefix('sh -c') + command = command.removeprefix('bash -c').removeprefix('sh -c').removeprefix(' ') # Remove quotes surrounding the command if (len(command) >= 2 and command[0] == command[-1] and (command[0] == "'" or command[0] == '"')): command = command[1:-1]