mirror of https://github.com/actions/setup-go.git
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:
parent
6ccafa914b
commit
461004e4c9
|
@ -93114,6 +93114,8 @@ exports.restoreCache = restoreCache;
|
||||||
const setWindowsCacheDirectories = () => __awaiter(void 0, void 0, void 0, function* () {
|
const setWindowsCacheDirectories = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (os_1.default.platform() !== 'win32')
|
if (os_1.default.platform() !== 'win32')
|
||||||
return;
|
return;
|
||||||
|
if (!fs_1.default.existsSync('D:'))
|
||||||
|
return;
|
||||||
let goCache = yield (0, cache_utils_1.getCommandOutput)(`go env GOCACHE`);
|
let goCache = yield (0, cache_utils_1.getCommandOutput)(`go env GOCACHE`);
|
||||||
core.info(`GOCACHE: ${goCache}`);
|
core.info(`GOCACHE: ${goCache}`);
|
||||||
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');
|
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');
|
||||||
|
|
|
@ -58,6 +58,8 @@ export const restoreCache = async (
|
||||||
export const setWindowsCacheDirectories = async () => {
|
export const setWindowsCacheDirectories = async () => {
|
||||||
if (os.platform() !== 'win32') return;
|
if (os.platform() !== 'win32') return;
|
||||||
|
|
||||||
|
if (!fs.existsSync('D:')) return;
|
||||||
|
|
||||||
let goCache = await getCommandOutput(`go env GOCACHE`);
|
let goCache = await getCommandOutput(`go env GOCACHE`);
|
||||||
core.info(`GOCACHE: ${goCache}`);
|
core.info(`GOCACHE: ${goCache}`);
|
||||||
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');
|
goCache = goCache.replace('C:', 'D:').replace('c:', 'd:');
|
||||||
|
|
Loading…
Reference in New Issue