mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-02-07 18:17:24 +00:00
Added check of 'process.env.UV_CACHE_DIR' to resolve linter warning
This commit is contained in:
parent
bd651064f0
commit
e381565822
1 changed files with 2 additions and 2 deletions
|
|
@ -53,11 +53,11 @@ async function saveCache(): Promise<void> {
|
|||
}
|
||||
|
||||
let actualCachePath = cacheLocalPath;
|
||||
if (process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
||||
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
||||
core.warning(
|
||||
`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}".`,
|
||||
);
|
||||
actualCachePath = process.env.UV_CACHE_DIR!;
|
||||
actualCachePath = process.env.UV_CACHE_DIR;
|
||||
}
|
||||
|
||||
core.info(`Saving cache path: ${actualCachePath}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue