Skip to content

Commit

Permalink
fix: module params (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSanal authored Sep 28, 2024
1 parent 9f04b23 commit 88f6b5b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions robyn/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,10 @@ def start_dev_server(config: Config, file_path: Optional[str] = None):


def start_app_normally(config: Config):
# Parsing the known and unknown arguments
known_arguments, unknown_args = config.parser.parse_known_args()
command = [sys.executable]

# Convert known arguments to a list of strings suitable for subprocess.run
known_args_list = [f"{key}={value}" for key, value in vars(known_arguments).items() if value is not None]

# Combine the python executable, unknown arguments, and known arguments
command = [sys.executable, *unknown_args, *known_args_list]
for arg in sys.argv[1:]:
command.append(arg)

# Run the subprocess
subprocess.run(command, start_new_session=False)
Expand Down

0 comments on commit 88f6b5b

Please sign in to comment.