File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import { join, resolve } from "path";
88 * Setup Swift on Windows as theres no support for Swiftly yet.
99 */
1010export async function setupWindows ( version : string ) {
11- await download ( version ) ;
12- addPath ( resolve ( "%LocalAppData%" , "Programs" , "Swift" ) ) ;
11+ const path = await download ( version ) ;
12+ addPath ( path ) ;
1313}
1414
1515async function download ( version : string ) {
@@ -31,5 +31,14 @@ async function download(version: string) {
3131 join ( tmpPath , "swift-installer.exe" ) ,
3232 ) ;
3333
34- await cmd ( installerPath , "/passive" ) ;
34+ const binPath = join ( tmpPath , "Swift" ) ;
35+
36+ await cmd (
37+ installerPath ,
38+ "/passive" ,
39+ `InstallRoot=${ binPath } ` ,
40+ "OptionsInstallIDE=0" ,
41+ ) ;
42+
43+ return binPath ;
3544}
You can’t perform that action at this time.
0 commit comments