Skip to content

Commit 56ef883

Browse files
committed
Minor patches
1 parent 7e77653 commit 56ef883

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sources/TSCBasic/Process.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import var Foundation.NSLocalizedDescriptionKey
1414

1515
#if os(Windows)
1616
import Foundation
17-
import WinSDK.core.sysinfo
17+
import WinSDK
1818
#endif
1919

2020
@_implementationOnly import TSCclibc

Tests/TSCBasicTests/ProcessTests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,17 @@ class ProcessTests: XCTestCase {
148148
149149
""")
150150

151+
// Create a non-executable file to test.
152+
let tempNonExecutable = tmpdir.appending(component: "program.bc")
153+
try localFileSystem.writeFileContents(tempNonExecutable, bytes: """
154+
@echo off
155+
exit
156+
157+
""")
158+
151159
try withCustomEnv(["PATH": tmpdir.pathString]) {
152160
XCTAssertNotNil(Process.findExecutable("program.bat"))
161+
XCTAssertNil(Process.findExecutable("program.bc"))
153162
}
154163
}
155164
#endif

0 commit comments

Comments
 (0)