fix: add check for D: drive existence in Windows cache directory setup

Signed-off-by: Anton Troshin <18515134+antontroshin@users.noreply.github.com>
This commit is contained in:
Anton Troshin 2025-06-12 02:24:23 -05:00
parent 6ccafa914b
commit 461004e4c9
No known key found for this signature in database
GPG Key ID: 678458281E064A8A
2 changed files with 4 additions and 0 deletions

2
dist/setup/index.js vendored
View File

@ -93114,6 +93114,8 @@ exports.restoreCache = restoreCache;
const setWindowsCacheDirectories = () => __awaiter(void 0, void 0, void 0, function* () {
if (os_1.default.platform() !== 'win32')
return;
if (!fs_1.default.existsSync('D:'))
return;
let goCache = yield (0, cache_utils_1.getCommandOutput)(`go env GOCACHE`);
core.info(`GOCACHE: ${goCache}`);
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');

View File

@ -58,6 +58,8 @@ export const restoreCache = async (
export const setWindowsCacheDirectories = async () => {
if (os.platform() !== 'win32') return;
if (!fs.existsSync('D:')) return;
let goCache = await getCommandOutput(`go env GOCACHE`);
core.info(`GOCACHE: ${goCache}`);
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');