Skip to content

Commit d473679

Browse files
committed
Fix Linux tests
1 parent 7a0d1be commit d473679

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Tests/ShellOutTests/ShellOutTests.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ShellOutTests: XCTestCase {
9595

9696
func testThrowingError() async {
9797
do {
98-
try await shellOut(to: "cd", arguments: ["notADirectory"])
98+
try await shellOut(to: .bash(arguments: ["cd notADirectory"]))
9999
XCTFail("Expected expression to throw")
100100
} catch let error as ShellOutError {
101101
XCTAssertTrue(error.message.contains("notADirectory"))
@@ -141,9 +141,8 @@ class ShellOutTests: XCTestCase {
141141
let pipe = Pipe()
142142

143143
do {
144-
try await shellOut(to: "cd",
145-
arguments: ["notADirectory"],
146-
errorHandle: pipe.fileHandleForWriting)
144+
try await shellOut(to: .bash(arguments: ["cd notADirectory"]),
145+
errorHandle: pipe.fileHandleForWriting)
147146
XCTFail("Expected expression to throw")
148147
} catch let error as ShellOutError {
149148
XCTAssertTrue(error.message.contains("notADirectory"))

0 commit comments

Comments
 (0)