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: use subprocess.Popen to avoid blocking due to the executable not… #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Edison-A-N
Copy link

I tried to reuse this plugin to open Cursor. Currently, there are some issues when opening Cursor from the command line on Ubuntu (refer to: getcursor/cursor#1763), which causes Cursor to fail to return correctly upon startup.

  • Using subprocess.run will block and wait for the command to return:

Run the command described by args. Wait for command to complete, then return a CompletedProcess instance.
https://docs.python.org/3/library/subprocess.html#subprocess.run

  • Using subprocess.Popen is non-blocking.

TODO:

More comprehensive management of the object returned by Popen.

… returning CompletedProcess, which prevents further input listening.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant