Skip to content

Commit

Permalink
Avoid duplicate rye bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Feb 7, 2024
1 parent d9927b7 commit 1d41269
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions 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.

7 changes: 3 additions & 4 deletions src/setup-rye.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,17 @@ async function installRye(
const tempDir = path.join(process.env['RUNNER_TEMP'] || '', 'rye_temp_home')
await io.mkdirP(tempDir)
core.debug(`Created temporary directory ${tempDir}`)
const cachedPath = await tc.cacheDir(tempDir, 'rye', version, arch)
const options: exec.ExecOptions = {
cwd: tempDir,
env: {
...process.env,
RYE_HOME: tempDir
RYE_HOME: cachedPath
}
}
core.info(`Installing Rye into ${tempDir}`)
core.info(`Installing Rye into ${cachedPath}`)
await exec.exec(downloadPath, ['self', 'install', '--yes'], options)

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

Expand Down

0 comments on commit 1d41269

Please sign in to comment.