Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
Comment on lines -93 to -100
Copy link
Contributor Author

@VishnuSanal VishnuSanal Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sansyrox please enlighten me on why there was the need for this much jargon here...? ! 🤔 were there a reason to not pass them directly? am I missing somehtign?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VishnuSanal , good find. I don't see a reason why this should exist.

Let me do a final review

for arg in sys.argv[1:]:
command.append(arg)

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