mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 12:38:24 +02:00
Fix windows .exe
This commit is contained in:
parent
b9cca7bdaa
commit
1f21ee1ce7
2 changed files with 6 additions and 3 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -47,9 +47,12 @@ export default async (options: Input): Promise<Output> => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addPath(binPath);
|
addPath(binPath);
|
||||||
const bunPath = join(binPath, "bun");
|
|
||||||
|
const exe = (name: string) =>
|
||||||
|
process.platform === "win32" ? `${name}.exe` : name;
|
||||||
|
const bunPath = join(binPath, exe("bun"));
|
||||||
try {
|
try {
|
||||||
symlinkSync(bunPath, join(binPath, "bunx"));
|
symlinkSync(bunPath, join(binPath, exe("bunx")));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== "EEXIST") {
|
if (error.code !== "EEXIST") {
|
||||||
throw error;
|
throw error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue