Fix windows .exe
This commit is contained in:
parent
b9cca7bdaa
commit
1f21ee1ce7
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);
|
||||
const bunPath = join(binPath, "bun");
|
||||
|
||||
const exe = (name: string) =>
|
||||
process.platform === "win32" ? `${name}.exe` : name;
|
||||
const bunPath = join(binPath, exe("bun"));
|
||||
try {
|
||||
symlinkSync(bunPath, join(binPath, "bunx"));
|
||||
symlinkSync(bunPath, join(binPath, exe("bunx")));
|
||||
} catch (error) {
|
||||
if (error.code !== "EEXIST") {
|
||||
throw error;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user