Skip to content

Commit

Permalink
Always set RYE_HOME to cached path (#188)
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 authored Feb 29, 2024
1 parent 6d859b6 commit aad0cd7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 133 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.

129 changes: 1 addition & 128 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"@actions/glob": "^0.4.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^20.0.2",
"node-fetch": "^3.3.2"
"@octokit/rest": "^20.0.2"
},
"devDependencies": {
"@types/node": "^20.11.20",
Expand Down
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 aad0cd7

Please sign in to comment.