Skip to content

Commit

Permalink
Update to Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hisaac committed Nov 15, 2018
1 parent 95a473b commit a3e122e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
4.1
4.2
8 changes: 8 additions & 0 deletions Package.resolved
@@ -0,0 +1,8 @@
{
"object": {
"pins": [

]
},
"version": 1
}
2 changes: 1 addition & 1 deletion Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:4.1
// swift-tools-version:4.2

/**
* ShellOut
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -15,13 +15,15 @@ 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")
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")
Expand Down

0 comments on commit a3e122e

Please sign in to comment.