Skip to content

Commit 784a4fc

Browse files
only attempt to run xcode-select on macOS
1 parent 75d1511 commit 784a4fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/toolchain/toolchain.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,10 @@ export class SwiftToolchain {
566566
// swift may be a symbolic link
567567
const realSwiftBinaryPath = await fs.realpath(swiftBinaryPath);
568568
// Check if the swift binary is managed by xcrun
569-
if (await this.isXcrunShim(realSwiftBinaryPath, logger)) {
569+
if (
570+
process.platform === "darwin" &&
571+
(await this.isXcrunShim(realSwiftBinaryPath, logger))
572+
) {
570573
const { stdout } = await execFile("xcrun", ["--find", "swift"], {
571574
env: configuration.swiftEnvironmentVariables,
572575
});

0 commit comments

Comments
 (0)