Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: module params #967

Merged
merged 1 commit into from
Sep 28, 2024
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
Loading