Skip to content

Commit a9219a5

Browse files
committed
Tests: use LocalFileSystem.writeFileContents(_:bytes:)
Rather than using `touch` which is not a universal command, use the `LocalFileSystem` APIs to create the file.
1 parent 4ebe06f commit a9219a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

IntegrationTests/Tests/IntegrationTests/Helpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func initGitRepo(
267267
do {
268268
if addFile {
269269
let file = dir.appending(component: "file.swift")
270-
try systemQuietly(["touch", file.pathString])
270+
localFileSystem.writeFileContents(file, bytes: "")
271271
}
272272

273273
try systemQuietly([Git.tool, "-C", dir.pathString, "init"])

Sources/SPMTestSupport/misc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public func initGitRepo(
120120
do {
121121
if addFile {
122122
let file = dir.appending(component: "file.swift")
123-
try systemQuietly(["touch", file.pathString])
123+
localFileSystem.writeFileContents(file, bytes: "")
124124
}
125125

126126
try systemQuietly([Git.tool, "-C", dir.pathString, "init"])

0 commit comments

Comments
 (0)