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")