Skip to content

Releases: kareman/SwiftShell

Improve error output

12 May 19:04
Compare
Choose a tag to compare
  • Improve error output from exit(...) and non-SwiftShell errors.

SwiftShell 3.0

29 Apr 20:06
Compare
Choose a tag to compare

The readme says it all.

Most notable recent changes:

  • the run(...) functions now return RunOutput 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

24 Mar 17:16
Compare
Choose a tag to compare
Pre-release
3.0.0-beta.12

2.1

08 May 20:13
Compare
Choose a tag to compare
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

22 Mar 11:04
Compare
Choose a tag to compare

Silenced all the warnings by replacing __X__ with #x.

2.0.1

21 Mar 00:20
Compare
Choose a tag to compare
  • Fix #15: run("cat","longtext.txt") never finishes for large files.
  • Add AsyncShellTask.exitcode().
  • Make sure the test script finds the SwiftShell launcher script.

SwiftShell 2.0

24 Feb 02:39
Compare
Choose a tag to compare

Pretty much everything has changed since SwiftShell 1. See the readme for more info.

v2.0b2

18 Dec 22:17
Compare
Choose a tag to compare
v2.0b2 Pre-release
Pre-release
  • 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

18 Dec 22:33
Compare
Choose a tag to compare

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.

https://developer.apple.com/library/prerelease/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html

Swift 2.0

14 Sep 19:51
Compare
Choose a tag to compare
v1.0