Releases: kareman/SwiftShell
Improve error output
- Improve error output from
exit(...)
and non-SwiftShell errors.
SwiftShell 3.0
The readme says it all.
Most notable recent changes:
-
the
run(...)
functions now returnRunOutput
instead of a String. -
many things were renamed to follow standard Swift naming guidelines.
-
Streams can read and write raw data.
-
Support for iOS – but only for Streams (running shell commands is not possible on iOS). This way other projects, like FileSmith, can use Streams. Streams should be their own module, but then they couldn't implement
CommandRunning
. This will be possible in Swift 4 I believe.
Support Swift 3.1 beta
3.0.0-beta.12
2.1
-
Have main.tempdirectory use the name of the script/application.
Fall back to ‘SwiftShell’ if main.path is empty (running in a playground).
-
Allow passing Ints as error codes to "exit".
-
Actually print error messages in release builds.
Workaround for a compiler bug where passing an NSError to exit in release builds would not print the actual error message.
-
Fix #16 by having WriteableStream use ‘print’ when writing to standard output.
This way print's buffering when standard output is not a terminal does not rearrange the order in which output is printed when using both 'print' and 'main.stdout.writeln'.
See also https://bugs.swift.org/browse/SR-1127 and http://stackoverflow.com/a/13933741/96587 . -
Add stop func to stop an AsyncShellTask early.
-
Add async callbacks for ReadableStream.onOutput and AsyncShellTask.onCompletion - allows for getting callbacks with data as the AsyncShellTask is running.
-
Add AsyncShellTask.onStringOutput.
Thanks to @kenthinson for implementing the 3 last ones.
Swift 2.2
2.0.1
SwiftShell 2.0
Pretty much everything has changed since SwiftShell 1. See the readme for more info.
v2.0b2
- Enable installation of framework to ~/Library/Frameworks by running 'xcodebuild install'.
- Add CollectionType.splitOnce and LazySplitGenerator.
- Add LazyCollectionType.split .
- Add ReadableStream.lines() for lazily splitting output into lines.
v1.1
Use $SWIFTSHELL_FRAMEWORK_PATH instead of $DYLD_FRAMEWORK_PATH in the swiftshell launcher script.
Because of this change in El Capitan:
Spawning children processes of processes restricted by System Integrity Protection, such as by launching a helper process in a bundle with NSTask or calling the exec(2) command, resets the Mach special ports of that child process. Any dynamic linker (dyld) environment variables, such as DYLD_LIBRARY_PATH, are purged when launching protected processes.