diff --git a/dist/setup/index.js b/dist/setup/index.js index 65f423f..b6cfc3f 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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:'); diff --git a/src/cache-restore.ts b/src/cache-restore.ts index a170a2f..dccdd19 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -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:');