Skip to content

Comments

appClosed being set prematurely#860

Merged
scriptingosx merged 4 commits intoInstallomator:devfrom
danwitkowski:main
Feb 24, 2023
Merged

appClosed being set prematurely#860
scriptingosx merged 4 commits intoInstallomator:devfrom
danwitkowski:main

Conversation

@danwitkowski
Copy link
Contributor

@danwitkowski danwitkowski commented Jan 23, 2023

The variable appClosed is being set to 1 if a blocking process is found, but before any processes are actually closed. This has unintended behavior in the case where BLOCKING_PROCESS_ACTION is silent_fail since nothing is actually closed in this case statement, only the cleanupAndExit function is called.

This function calls reopenClosedProcess which checks whether appClosed is set and tries to reopen the app if so. Because the app was already open (which is why we entered this case statement in the first place) and the variable was set prematurely, all this does is instead pop the app into focus on the user's screen, interrupting whatever it was they were doing.

This was noticed due to any app that we attempted to update with this method popping into focus one or more times a day.

I added an additional function to set this value in cases where Apple Script is being used to try and closed the app, so that this variable gets set correctly in each case. I also set the variable for the case where instead of Apple Script, the pkill command is used.

@scriptingosx scriptingosx added this to the v11 milestone Jan 25, 2023
@scriptingosx scriptingosx added duplicate This issue or pull request already exists improvement minor improvement of an existing feature labels Jan 25, 2023
@scriptingosx
Copy link
Collaborator

duplicate of #657 which is already merged into the dev branch for v11

@scriptingosx scriptingosx changed the base branch from main to dev February 10, 2023 11:35
@scriptingosx scriptingosx merged commit 8741946 into Installomator:dev Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists improvement minor improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants