Skip to content

Commit

Permalink
Always set RYE_HOME to cached path
Browse files Browse the repository at this point in the history
If rye was found in the tools cache of hosted runners RYE_HOME was not set. That led to the creation of the .rye folder in the user home.
  • Loading branch information
eifinger committed Feb 29, 2024
1 parent 6d859b6 commit 7d3cf8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/setup-rye.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,14 @@ async function installRye(

const cachedPath = await tc.cacheDir(tempDir, 'rye', version, arch)
core.info(`Moved Rye into ${cachedPath}`)
core.exportVariable('RYE_HOME', cachedPath)
return cachedPath
}

function addRyeToPath(cachedPath: string): void {
core.addPath(`${cachedPath}/shims`)
core.info(`Added ${cachedPath}/shims to the path`)
core.exportVariable('RYE_HOME', `${cachedPath}/.rye`)
core.debug(`Set RYE_HOME to ${cachedPath}/.rye`)
}

function addMatchers(): void {
Expand Down

0 comments on commit 7d3cf8f

Please sign in to comment.