Skip to content

Commit a4b28fe

Browse files
committed
[feat]: run and debug
1 parent 2178be1 commit a4b28fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/ScriptToolkit/ScriptToolkit.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ public struct ScriptToolkit {
2020
////////////////////////////////////////////////////////////////////////////////
2121
// MARK: - Helpers
2222

23-
23+
@discardableResult public func runAndDebug(_ executable: String, _ args: Any ..., combineOutput: Bool = false) -> RunOutput {
24+
let stringargs = args.flatten().map(String.init(describing:))
25+
print(executable, String(describing: stringargs))
26+
return run(executable, args, combineOutput: combineOutput)
27+
}
2428

2529
func matches(for regex: String, in text: String) -> [String] {
2630
do {

0 commit comments

Comments
 (0)