Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only restart if a machine is running
### What does this PR do? No matter what, it would try to restart regardless if a machine was running or not. This is because the if statement was: `if (isRunning !== '')` which will always return true even if isRunning was undefined. The if statement has now been changes to `if (isRunning)` meaning it will only run if isRunning is defined (not ''). ### Screenshot/screencast of this PR <!-- Please include a screenshot or a screencast explaining what is doing this PR --> N/A. The prompt will not appear when trying to restart it if there is no machine running. ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes #3321 ### How to test this PR? <!-- Please explain steps to reproduce --> Click on Docker Compatibility with a Podman Machine stopped. You should not get the prompt to restart the podman machine. Signed-off-by: Charlie Drage <charlie@charliedrage.com>
- Loading branch information
Showing
3 changed files
with
55 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters