Skip to content

Commit cc93630

Browse files
committed
Test extracting with a fixed temp path
1 parent 302ceac commit cc93630

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/swiftly/installers/macos.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { downloadTool, find } from "@actions/tool-cache";
2-
import { cmd } from "../../core";
1+
import { downloadTool, extractTar, find } from "@actions/tool-cache";
2+
import { cmd, tempDir } from "../../core";
33
import { addPath, debug } from "@actions/core";
4+
import { join } from "path";
45

56
export async function setupMacOS() {
67
let path = find("swiftly", "1.0.0");
@@ -17,8 +18,10 @@ export async function setupMacOS() {
1718
}
1819

1920
async function download() {
21+
const tmpPath = tempDir();
2022
const pkg = await downloadTool(
2123
"https://download.swift.org/swiftly/darwin/swiftly.pkg",
24+
join(tmpPath, "swiftly.pkg"),
2225
);
2326
await cmd("installer", "-pkg", pkg, "-target", "CurrentUserHomeDirectory");
2427
return "~/.swiftly/bin/swiftly";

0 commit comments

Comments
 (0)