Skip to content

Commit 2dd70f9

Browse files
committed
Try to resolve location of swiftly
1 parent 75141c4 commit 2dd70f9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/swiftly/installers/macos.ts

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

67
export async function setupMacOS() {
78
let path = find("swiftly", "1.0.0");
@@ -24,9 +25,6 @@ async function download() {
2425
join(tmpPath, "swiftly.pkg"),
2526
);
2627

27-
const target = join(tmpPath, "bin");
28-
29-
await cmd("installer", "-pkg", pkg, "-target", target);
30-
31-
return target;
28+
await cmd("installer", "-pkg", pkg, "-target", "CurrentUserHomeDirectory");
29+
return join(homedir(), ".swiftly", "bin");
3230
}

0 commit comments

Comments
 (0)