Skip to content

onStringOutput returning nothing. #97

Description

Hi! I'm new to this, so I might be making a user error, but I'm not sure where to ask.

I'm playing around with this library right now and I'm trying to start simple by downloading a file using cURL. However, when I call onStringOutput, I get nothing. I'm probably using this incorrectly, but hopefully, you guys can help. It looks like a really great library and a huge upgrade from what I was using (as long as this async stuff works.)

let asyncCommand = runAsync(bash: "curl -L -o ~/.patched-sur/Download.html https://support.apple.com/en-us/HT211983").onCompletion { command in
    at = 0
}
asyncCommand.stdout.onStringOutput {
    print($0)
}
do {
    try asyncCommand.finish()
} catch {
    print("SOMETHING WENT WRONG")
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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