PR: Use a more fine-grained name to detect if Spyder is running#14
PR: Use a more fine-grained name to detect if Spyder is running#14ccordoba12 merged 1 commit intospyder-ide:mainfrom
Conversation
|
Hmm... on macOS |
|
Perhaps we should use then |
Okay, I think we can just use and |
|
|
||
| wait_for_spyder_quit(){ | ||
| while [[ $(pgrep spyder 2> /dev/null) ]]; do | ||
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do |
There was a problem hiding this comment.
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do | |
| while [[ $(pgrep -f spyder-runtime 2> /dev/null) ]]; do |
There was a problem hiding this comment.
I think if we add the -f flag, then it will search the entire command instead of just the process name, so it should work for both macOS and Linux. This seemed to work for me on macOS; I could isolate and distinguish between Spyder and Spyder updater.
There was a problem hiding this comment.
Sorry, this fails for me on Linux (i.e. I get the same behavior as with pgrep spyder).
There was a problem hiding this comment.
However, this works, which I think it's better
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do | |
| while [[ $(pgrep -f spyder-runtime/bin 2> /dev/null) ]]; do |
There was a problem hiding this comment.
That's interesting; I wonder why /bin works but sans /bin does not? Anyway, this appears to work on macOS as well, so it should be good.
40ac7e5 to
5809a81
Compare
Right now we're using
pgrep spyderto check if Spyder is still running before starting the update.However, that matches the command used to run the updater on Linux, which in my case is:
And that makes the updater wait indefinitely for itself to be closed.
So, if we use
pgrep spyder-runtime, we shouldn't have this problem.