Skip to content

Commit

Permalink
Readme: add note about 'run' commands with large output hanging.
Browse files Browse the repository at this point in the history
To address #52.
  • Loading branch information
kareman authored Feb 13, 2018
1 parent b6c8f82 commit 43bf9a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,16 @@ let date = run("date", "-u").stdout
print("Today's date in UTC is " + date)
```

 

Note: If the output from the command into either standard output or standard error is larger than 65,536 bytes, the command will hang and never finish ([#52](https://github.com/kareman/SwiftShell/issues/52)). To work around this problem, use runAsync instead and read all the output, even if you're not going to use it:

```swift
_ = runAsync("command").stdout.read()
```



#### Print output

```swift
Expand Down

0 comments on commit 43bf9a1

Please sign in to comment.