mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-02-22 08:41:44 +00:00
Removed check for unset UV_CACHE_DIR per PR comment
This commit is contained in:
parent
c8190078fd
commit
832b4cc483
1 changed files with 7 additions and 10 deletions
|
|
@ -55,16 +55,13 @@ async function saveCache(): Promise<void> {
|
||||||
// Check if UV_CACHE_DIR has been changed externally from this action
|
// Check if UV_CACHE_DIR has been changed externally from this action
|
||||||
let actualCachePath = cacheLocalPath;
|
let actualCachePath = cacheLocalPath;
|
||||||
if (process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
if (process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
||||||
if (process.env.UV_CACHE_DIR) {
|
// Don't need to check for unset UV_CACHE_DIR because:
|
||||||
core.warning(
|
// 1. We set the UV_CACHE_DIR earlier on in this action
|
||||||
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath}".`
|
// 2. Once an environment variable is set in GitHub Actions, it cannot be unset.
|
||||||
);
|
core.warning(
|
||||||
actualCachePath = process.env.UV_CACHE_DIR;
|
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath}".`,
|
||||||
} else {
|
);
|
||||||
core.warning(
|
actualCachePath = process.env.UV_CACHE_DIR!;
|
||||||
`The environment variable UV_CACHE_DIR has been unset, by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen unset cache-local-path input from "${cacheLocalPath}".`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(`Saving cache path: ${actualCachePath}`);
|
core.info(`Saving cache path: ${actualCachePath}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue