Skip to content

Commit

Permalink
Fix windows executable name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyvaartjes committed Aug 19, 2024
1 parent d4570cb commit eff8d47
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function run(): Promise<void> {
await chmod(pklBinaryPath, permissionsMode)
const cachedPath = await tc.cacheFile(
pklBinaryPath,
'pkl',
destinationFileName(),
'pkl',
pklVersion
)
Expand Down Expand Up @@ -83,3 +83,13 @@ function findAssetName(): string {

throw new Error(`Couldn't find asset name for ${op}-${arch}`)
}

function destinationFileName(): string {
const op = os.platform()
switch (op) {
case 'win32':
return 'pkl.exe'
default:
return 'pkl'
}
}

0 comments on commit eff8d47

Please sign in to comment.