Add symlink for bunx
This commit is contained in:
parent
67e559db2c
commit
b5e3caf47a
@ -1,6 +1,6 @@
|
|||||||
import { homedir } from "node:os";
|
import { homedir } from "node:os";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { readdir } from "node:fs/promises";
|
import { readdir, symlink } from "node:fs/promises";
|
||||||
import * as action from "@actions/core";
|
import * as action from "@actions/core";
|
||||||
import { downloadTool, extractZip } from "@actions/tool-cache";
|
import { downloadTool, extractZip } from "@actions/tool-cache";
|
||||||
import * as cache from "@actions/cache";
|
import * as cache from "@actions/cache";
|
||||||
@ -51,6 +51,13 @@ export default async (options?: {
|
|||||||
"Downloaded a new version of Bun, but failed to check its version? Try again in debug mode."
|
"Downloaded a new version of Bun, but failed to check its version? Try again in debug mode."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
await symlink(path, join(dir, "bunx"));
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code !== "EEXIST") {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (cacheEnabled) {
|
if (cacheEnabled) {
|
||||||
try {
|
try {
|
||||||
await saveCache([path], cacheKey);
|
await saveCache([path], cacheKey);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user