Skip to content

Commit

Permalink
Fix bug in #17 implementation on non windows platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-corneliusson committed Jun 12, 2024
1 parent 48f094d commit 2ce4bdb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions click_web/resources/cmd_exec.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import shlex
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -176,16 +177,18 @@ def __init__(self, script_file_path: str, command):
self._parts = []
self.append(_get_python_interpreter())
self.append(script_file_path)
self.append(command)
for arg in shlex.split(command):
self.append(arg)

def append(self, part: str, secret: bool = False):
self._parts.append(part)

def get_commandline(self, obfuscate: bool = False) -> str:
def get_commandline(self, obfuscate: bool = False) -> List[str]:
"""
Return command line as string.
Return command line as a list of strings.
obfuscate - not supported for this implementation
"""
return " ".join(self._parts)
return self._parts

def get_download_field_infos(self):
return []
Expand Down

0 comments on commit 2ce4bdb

Please sign in to comment.