@@ -53,44 +53,6 @@ import ShellQuote
53
53
)
54
54
}
55
55
56
- /**
57
- * Run a series of shell commands using Bash
58
- *
59
- * - parameter commands: The commands to run
60
- * - parameter path: The path to execute the commands at (defaults to current folder)
61
- * - parameter process: Which process to use to perform the command (default: A new one)
62
- * - parameter outputHandle: Any `FileHandle` that any output (STDOUT) should be redirected to
63
- * (at the moment this is only supported on macOS)
64
- * - parameter errorHandle: Any `FileHandle` that any error output (STDERR) should be redirected to
65
- * (at the moment this is only supported on macOS)
66
- * - parameter environment: The environment for the command.
67
- *
68
- * - returns: The output of running the command
69
- * - throws: `ShellOutError` in case the command couldn't be performed, or it returned an error
70
- *
71
- * Use this function to "shell out" in a Swift script or command line tool
72
- * For example: `shellOut(to: ["mkdir NewFolder", "cd NewFolder"], at: "~/CurrentFolder")`
73
- */
74
- @discardableResult public func shellOut(
75
- to commands: [ String ] ,
76
- at path: String = " . " ,
77
- process: Process = . init( ) ,
78
- outputHandle: FileHandle ? = nil ,
79
- errorHandle: FileHandle ? = nil ,
80
- environment: [ String : String ] ? = nil
81
- ) throws -> String {
82
- let command = commands. joined ( separator: " && " )
83
-
84
- return try shellOut (
85
- to: command,
86
- at: path,
87
- process: process,
88
- outputHandle: outputHandle,
89
- errorHandle: errorHandle,
90
- environment: environment
91
- )
92
- }
93
-
94
56
/**
95
57
* Run a pre-defined shell command using Bash
96
58
*
0 commit comments