Skip to content

Commit d47b283

Browse files
committed
support for configuring arguments
1 parent 81c95ea commit d47b283

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/run-script/Config.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ struct Script: Codable {
2020

2121
let path: String?
2222
let script: String?
23+
24+
let arguments: [String]?
2325
}

Sources/run-script/main.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func run(_ script: Script) throws {
5252

5353
if let path = script.path {
5454
process.arguments = [path]
55+
} else if let arguments = script.arguments, !arguments.isEmpty {
56+
process.arguments = arguments
5557
} else if let script = script.script {
5658
process.arguments = ["-c", script]
5759
}

0 commit comments

Comments
 (0)