mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 22:00:34 +00:00
Revert "add all MISE_ env vars to cache key (#197)"
This reverts commit a5b33d7b88.
This commit is contained in:
parent
429184fe4b
commit
233d283dd6
3 changed files with 7 additions and 17 deletions
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
|
|
@ -66597,10 +66597,7 @@ async function restoreMiseCache() {
|
|||
core.startGroup('Restoring mise cache');
|
||||
const version = core.getInput('version');
|
||||
const installArgs = core.getInput('install_args');
|
||||
// all env vars that start with MISE_ are used in the cache key
|
||||
// this allows users to set MISE_ENV or other variables that affect the cache
|
||||
// without having to modify the cache key prefix
|
||||
const env_key = JSON.stringify(Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith('MISE_'))));
|
||||
const { MISE_ENV } = process.env;
|
||||
const cachePath = miseDir();
|
||||
const fileHash = await glob.hashFiles([
|
||||
`**/.config/mise/config.toml`,
|
||||
|
|
@ -66634,8 +66631,8 @@ async function restoreMiseCache() {
|
|||
if (version) {
|
||||
primaryKey = `${primaryKey}-${version}`;
|
||||
}
|
||||
if (env_key) {
|
||||
primaryKey = `${primaryKey}-${env_key}`;
|
||||
if (MISE_ENV) {
|
||||
primaryKey = `${primaryKey}-${MISE_ENV}`;
|
||||
}
|
||||
if (installArgs) {
|
||||
const tools = installArgs
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
13
src/index.ts
13
src/index.ts
|
|
@ -74,14 +74,7 @@ async function restoreMiseCache(): Promise<string | undefined> {
|
|||
core.startGroup('Restoring mise cache')
|
||||
const version = core.getInput('version')
|
||||
const installArgs = core.getInput('install_args')
|
||||
// all env vars that start with MISE_ are used in the cache key
|
||||
// this allows users to set MISE_ENV or other variables that affect the cache
|
||||
// without having to modify the cache key prefix
|
||||
const env_key = JSON.stringify(
|
||||
Object.fromEntries(
|
||||
Object.entries(process.env).filter(([key]) => key.startsWith('MISE_'))
|
||||
)
|
||||
)
|
||||
const { MISE_ENV } = process.env
|
||||
const cachePath = miseDir()
|
||||
const fileHash = await glob.hashFiles(
|
||||
[
|
||||
|
|
@ -117,8 +110,8 @@ async function restoreMiseCache(): Promise<string | undefined> {
|
|||
if (version) {
|
||||
primaryKey = `${primaryKey}-${version}`
|
||||
}
|
||||
if (env_key) {
|
||||
primaryKey = `${primaryKey}-${env_key}`
|
||||
if (MISE_ENV) {
|
||||
primaryKey = `${primaryKey}-${MISE_ENV}`
|
||||
}
|
||||
if (installArgs) {
|
||||
const tools = installArgs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue