macadmins / installapplications

A tool for dynamically using installapplication
Apache License 2.0
285 stars 62 forks source link

infinite loop when userscript fails #72

Closed erikng closed 4 years ago

erikng commented 4 years ago

if a userscript fails, installapplications doesn't remove the touch file, so you get into an infinite loop.

    if opts.userscript:
        iaslog('Running in userscript mode')
        uscript = runuserscript(iauserscriptpath)
        if uscript:
            os.remove(userscripttouchpath)
            sys.exit(0)
        else:
            iaslog('Failed to run script!')
            sys.exit(1)

should be

    if opts.userscript:
        iaslog('Running in userscript mode')
        uscript = runuserscript(iauserscriptpath)
        if uscript:
            os.remove(userscripttouchpath)
            sys.exit(0)
        else:
            iaslog('Failed to run script!')
            os.remove(userscripttouchpath)
            sys.exit(1)
erikng commented 4 years ago

fixed with: https://github.com/macadmins/installapplications/commit/5218c9683c0ec72e784106611a93eafb5b0ed20f