Skip to content

Commit 079aebb

Browse files
Merge pull request #9331 from ThomasWaldmann/fix-cockpit-commandline
cockpit: fix subprocess invocation in frozen binaries
2 parents feb81cf + 054194f commit 079aebb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/borg/cockpit/runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ async def start(self):
2828
self.logger.warning("Borg process already running.")
2929
return
3030

31-
cmd = [sys.executable, "-m", "borg"] + self.command
31+
if getattr(sys, "frozen", False):
32+
cmd = [sys.executable] + self.command # executable == pyinstaller binary
33+
else:
34+
cmd = [sys.executable, "-m", "borg"] + self.command # executable == python interpreter
3235

3336
self.logger.info(f"Starting Borg process: {cmd}")
3437

0 commit comments

Comments
 (0)