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

If a user script fails, InstallApplications should stop running #74

Open
erikng opened this issue Jul 23, 2020 · 2 comments
Open

If a user script fails, InstallApplications should stop running #74

erikng opened this issue Jul 23, 2020 · 2 comments

Comments

@erikng
Copy link
Member

erikng commented Jul 23, 2020

if root scripts fail multiple times, the run will stop, however if a user script fails, the run will keep going.

This is could be problematic for environments that need the user section to complete successfully. With 5218c96 I fixed the infinite looping when not exiting 0, but introduced this issue.

This will be a difficult one to solve since the user side runs in a different process and we cannot capture the state of the run itself.

@bfreezy
Copy link
Contributor

bfreezy commented Sep 18, 2020

I've been pondering this as well in my testing...

Currently, I've been unloading IA's LaunchDaemon from within the user script if it fails. That method is less than ideal and requires some hacking.

An idea (haven't tested this):

  • Perhaps after iaslog('Failed to run user script!') in 5218c96 we could drop another artifact (eg. touch a file)?
  • Then, in the IA main process, when the while os.path.isfile(userscripttouchpath): process breaks, we could check if that artifact is present and stop the run there?

@erikng
Copy link
Member Author

erikng commented Sep 21, 2020

That's a pretty good idea.

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

No branches or pull requests

2 participants