Skip to content

Commit 0cbfdc5

Browse files
committed
Make sure we return the path to the binary
1 parent b4136be commit 0cbfdc5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as os from 'os'
22
import * as core from '@actions/core'
33
import * as cache from '@actions/tool-cache'
44
import * as semver from 'semver'
5+
import path from 'path'
56

67
const toolName = 'mach-composer'
78

@@ -43,8 +44,10 @@ function getArch(): string {
4344
async function downloadCLI(version: string): Promise<string> {
4445
const url = getReleaseURL(version)
4546
const artifactPath = await cache.downloadTool(url)
46-
const path = await cache.extractTar(artifactPath)
47-
return await cache.cacheFile(path, toolName, toolName, version)
47+
const dirPath = await cache.extractTar(artifactPath)
48+
const binPath = path.join(dirPath, 'bin/mach-composer')
49+
50+
return await cache.cacheFile(binPath, toolName, toolName, version)
4851
}
4952

5053
export function getReleaseURL(version: string): string {

0 commit comments

Comments
 (0)