Skip to content

[Feature Request] Support fine-grained KeepAlive control? #7

@rami3l

Description

@rami3l

Thanks a lot for making this wonderful library!

LaunchAgent.keepAlive in its current form can only accept a Bool, but I have encountered the following case where a simple true is not enough since I have to distinguish between zero and non-zero exit codes (a very well-written rationale can be found at https://github.com/tjluoma/launchd-keepalive#launchd-keepalive).

In short, this KeepAlive field has to look like this if I want to follow the best practice:

<key>KeepAlive</key>
  <dict>
    <key>SuccessfulExit</key>
      <false/>
    <key>Crashed</key>
      <true/>
  </dict>

Is it possible to use an enum or something for the type of this field? I'm not that familiar with Swift, but if it is a minor change, maybe I can do something about it... 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions