Skip to content

Commit cd34367

Browse files
committed
Dig deeper
1 parent 188bbe5 commit cd34367

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/swift/windows.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import { join, resolve } from "path";
99
*/
1010
export async function setupWindows(version: string) {
1111
const path = await download(version);
12-
addPath(
13-
"C:\\Library\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin",
14-
);
12+
addPath(path);
1513
}
1614

1715
async function download(version: string) {
@@ -33,16 +31,22 @@ async function download(version: string) {
3331
join(tmpPath, "swift-installer.exe"),
3432
);
3533

36-
const binPath = join(tmpPath, "Swift");
34+
const targetPath = join(tmpPath, "Swift");
3735

3836
await cmd(
3937
installerPath,
4038
"/passive",
41-
//`InstallRoot=${binPath}`,
39+
`InstallRoot=${targetPath}`,
4240
"OptionsInstallIDE=0",
4341
);
4442

45-
// await cmd("dir", binPath, "Toolchains");
43+
await cmd("dir", targetPath, "Toolchains");
4644

47-
return binPath;
45+
return join(
46+
targetPath,
47+
"Toolchains",
48+
"unknown-Asserts-development.xctoolchain",
49+
"usr",
50+
"bin",
51+
);
4852
}

0 commit comments

Comments
 (0)