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

Signed-off-by: Anton Troshin <18515134+antontroshin@users.noreply.github.com>
pull/515/head
Anton Troshin 1 month ago
parent 6ccafa914b
commit 461004e4c9
No known key found for this signature in database
GPG Key ID: 678458281E064A8A

@ -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:');

@ -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:');

Loading…
Cancel
Save