Skip to content

Commit c211d8f

Browse files
committed
Specify installer path
1 parent f1babb0 commit c211d8f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/swift/windows.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { addPath, debug } from "@actions/core";
22
import { downloadTool, find } from "@actions/tool-cache";
3-
import { cmd } from "../core";
3+
import { cmd, tempDir } from "../core";
44
import { machine } from "os";
5+
import { join } from "path";
56

67
/**
78
* Setup Swift on Windows as theres no support for Swiftly yet.
@@ -22,7 +23,12 @@ async function download(version: string) {
2223

2324
debug(`Downloading Swift installer from ${url}`);
2425

25-
const installerPath = await downloadTool(url);
26+
const tmpPath = tempDir();
27+
28+
const installerPath = await downloadTool(
29+
url,
30+
join(tmpPath, "swift-installer.exe"),
31+
);
2632

2733
await cmd(installerPath);
2834
}

0 commit comments

Comments
 (0)