Skip to content

Commit 78503b7

Browse files
fix command executor and update dependencies
minor changes
1 parent 541096a commit 78503b7

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

Package.resolved

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
{
22
"object": {
33
"pins": [
4+
{
5+
"package": "CwlCatchException",
6+
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
10+
"version": "2.1.1"
11+
}
12+
},
13+
{
14+
"package": "CwlPreconditionTesting",
15+
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "fb7a26374e8570ff5c68142e5c83406d6abae0d8",
19+
"version": "2.0.2"
20+
}
21+
},
422
{
523
"package": "Nimble",
624
"repositoryURL": "https://github.com/Quick/Nimble.git",
725
"state": {
826
"branch": null,
9-
"revision": "7fd118ec8795888bcbbebc1a41f6984454c4cd6f",
10-
"version": "8.0.7"
27+
"revision": "c93f16c25af5770f0d3e6af27c9634640946b068",
28+
"version": "9.2.1"
1129
}
1230
},
1331
{
1432
"package": "Quick",
1533
"repositoryURL": "https://github.com/Quick/Quick.git",
1634
"state": {
1735
"branch": null,
18-
"revision": "33682c2f6230c60614861dfc61df267e11a1602f",
19-
"version": "2.2.0"
36+
"revision": "bd86ca0141e3cfb333546de5a11ede63f0c4a0e6",
37+
"version": "4.0.0"
2038
}
2139
}
2240
]

Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ let package = Package(
1010
.library(name: "Swiftline", targets: ["Swiftline"]),
1111
],
1212
dependencies: [
13-
.package(url: "https://github.com/Quick/Quick.git", from: "2.2.0"),
14-
.package(url: "https://github.com/Quick/Nimble.git", from: "8.0.7"),
13+
.package(url: "https://github.com/Quick/Quick.git", from: "4.0.0"),
14+
.package(url: "https://github.com/Quick/Nimble.git", from: "9.0.0"),
1515
],
1616
targets: [
1717
.target(name: "Swiftline", path: "Sources"),

Sources/CommandExecutor.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LogTaskExecutor: TaskExecutor {
130130
var childFDActions = STDLIB._make_posix_spawn_file_actions_t()
131131
let outputPipe: Int32 = 69
132132
let outerrPipe: Int32 = 70
133-
133+
134134
defer {
135135
for case let arg? in argv { free(arg) }
136136
posix_spawn_file_actions_addclose(&childFDActions, outputPipe)
@@ -144,7 +144,8 @@ class LogTaskExecutor: TaskExecutor {
144144
posix_spawn_file_actions_adddup2(&childFDActions, outputPipe, 1)
145145
posix_spawn_file_actions_adddup2(&childFDActions, outerrPipe, 2)
146146

147-
var result = posix_spawn(&pid, argv[0], &childFDActions, nil, argv + [nil], ActualTaskExecutor.environment)
147+
let argvPointer = UnsafePointer(argv[0])
148+
var result = posix_spawn(&pid, argvPointer, &childFDActions, nil, argv + [nil], ActualTaskExecutor.environment)
148149
guard result == 0 else { return (Int(result), "", "") }
149150
waitpid(pid, &result, 0)
150151

0 commit comments

Comments
 (0)