ulauncher-vscode-projects icon indicating copy to clipboard operation
ulauncher-vscode-projects copied to clipboard

fix: use subprocess.Popen to avoid blocking due to the executable not…

Open Edison-A-N opened this issue 5 months ago • 0 comments

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: https://github.com/getcursor/cursor/issues/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.

Edison-A-N avatar Sep 07 '24 06:09 Edison-A-N