From a3e122e76f8df1ad31d5790c5b9ff079b0d4b20e Mon Sep 17 00:00:00 2001 From: Isaac Halvorson Date: Thu, 15 Nov 2018 08:09:23 -0600 Subject: [PATCH] Update to Swift 4.2 --- .swift-version | 2 +- Package.resolved | 8 ++++++++ Package.swift | 2 +- README.md | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Package.resolved diff --git a/.swift-version b/.swift-version index 7d5c902..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.1 +4.2 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..5cefbe8 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,8 @@ +{ + "object": { + "pins": [ + + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index 5d66919..8a29037 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.1 +// swift-tools-version:4.2 /** * ShellOut diff --git a/README.md b/README.md index 69f660d..a8cbbf0 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ print(output) // Hello world ``` You can also easily run a series of commands at once, optionally at a given path: + ```swift try shellOut(to: ["mkdir NewFolder", "echo \"Hello again\" > NewFolder/File"], at: "~/CurrentFolder") let output = try shellOut(to: "cat File", at: "~/CurrentFolder/NewFolder") @@ -22,6 +23,7 @@ print(output) // Hello again ``` In case of an error, ShellOut will automatically read `STDERR` and format it nicely into a typed Swift error: + ```swift do { try shellOut(to: "totally-invalid")