JohnSundell / JohnSundell/ShellOut
Uncaught NSRangeException on waitUntilExit()
- Dominant language
- Swift
- Stars
- 888
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone. I'm getting a strange error using ShellOut. My app crashes with an NSRangeException on the waitUntilExit() call in the launchBash function (ShellOut:428). This seems to mainly be happening when ShellOut is used in an onAppear or onReceive function using SwiftUI. I am calling ShellOut using syntax `let shellOutput = try shellOut(to: command)`. This seems to work outside of these SwiftUI functions.
`*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'
terminating with uncaught exception of type NSException`
Does anyone have an idea what could be going on here? Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.