diff --git a/.gitignore b/.gitignore index 6639af6..745347a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .vscode .DS_store dist/* +.idea diff --git a/trogon/trogon.py b/trogon/trogon.py index 1238747..6f845dc 100644 --- a/trogon/trogon.py +++ b/trogon/trogon.py @@ -2,6 +2,7 @@ import os import shlex +import sys from pathlib import Path from webbrowser import open as open_url @@ -258,10 +259,9 @@ def run( f"Running [b cyan]{self.app_name} {' '.join(shlex.quote(s) for s in self.post_run_command)}[/]" ) - split_app_name = shlex.split(self.app_name) program_name = shlex.split(self.app_name)[0] - arguments = [*split_app_name, *self.post_run_command] - os.execvp(program_name, arguments) + arguments = [sys.executable, program_name, *self.post_run_command] + os.execvp(sys.executable, arguments) @on(CommandForm.Changed) def update_command_to_run(self, event: CommandForm.Changed):