hammerspoon2-docs
    Preparing search index...

    Function runAsync

    • Create and run a task asynchronously

      Parameters

      • launchPath: string

        Full path to the executable

      • args: string[]

        Array of arguments

      • Optionaloptions: Object | Function

        Options object or legacy callback

      • OptionallegacyStreamCallback: Function

        Legacy streaming callback

      Returns Promise<{ exitCode: number; stderr: string; stdout: string }>

      The task's result. If the task exits with a non-zero status or is killed by a signal, the promise rejects with an Error that also has the result's exitCode, stdout, stderr and reason. If the program could not be started, the promise rejects with an Error whose reason is "launchFailed"