Skip to content

Commit 60820b4

Browse files
committed
fix: target elide bin path when cached
Signed-off-by: Sam Gammon <[email protected]>
1 parent bbb6d14 commit 60820b4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/releases.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ async function maybeDownload(
300300
/* istanbul ignore next */
301301
let elideHome: string = process.env.ELIDE_HOME || options.install_path
302302
let elidePathTarget = elideHome
303-
const elideBin: string = elideHome // @TODO(sgammon): bin folder?
303+
let elideBin: string = elideHome // @TODO(sgammon): bin folder?
304304
let elideDir: string | null = null
305305

306306
try {
@@ -316,7 +316,9 @@ async function maybeDownload(
316316
if (options.no_cache !== true && elideDir) {
317317
// we have an existing cached copy of elide
318318
core.debug('Caching enabled and cached Elide release found; using it')
319-
elidePath = elideDir
319+
elidePath = `${elideDir}/elide`
320+
elidePathTarget = elideDir
321+
elideBin = elideDir
320322
core.info(`Using cached copy of Elide at version ${version.tag_name}`)
321323
} else {
322324
/* istanbul ignore next */
@@ -364,6 +366,7 @@ async function maybeDownload(
364366
)
365367

366368
elidePathTarget = cachedPath
369+
elideBin = cachedPath
367370
core.debug(`Elide release cached at: ${cachedPath}`)
368371
} else {
369372
core.debug('Tool caching is disabled; not caching downloaded release')

0 commit comments

Comments
 (0)