@@ -72836,7 +72836,7 @@ const core = __importStar(__nccwpck_require__(2186));
7283672836const exec = __importStar(__nccwpck_require__(1514));
7283772837const io = __importStar(__nccwpck_require__(7436));
7283872838const hc = __importStar(__nccwpck_require__(6255));
72839- const fs_1 = __nccwpck_require__(7147);
72839+ const fs_1 = __importStar( __nccwpck_require__(7147) );
7284072840const path_1 = __importDefault(__nccwpck_require__(1017));
7284172841const os_1 = __importDefault(__nccwpck_require__(2037));
7284272842const semver_1 = __importDefault(__nccwpck_require__(5911));
@@ -73008,6 +73008,16 @@ class DotnetInstallScript {
7300873008 }
7300973009}
7301073010exports.DotnetInstallScript = DotnetInstallScript;
73011+ // Workaround for slow installation on Windows with network attached C: drive
73012+ // see https://github.com/actions/setup-dotnet/issues/260
73013+ const fixWindowsInstallDir = (installDir) => {
73014+ if (!(0, utils_1.isSelfHosted)() && fs_1.default.existsSync('d:\\')) {
73015+ return installDir.replace(/^[cC]:\\/, 'd:\\');
73016+ }
73017+ else {
73018+ return installDir;
73019+ }
73020+ };
7301173021class DotnetInstallDir {
7301273022 static convertInstallPathToAbsolute(installDir) {
7301373023 if (path_1.default.isAbsolute(installDir))
@@ -73029,7 +73039,7 @@ exports.DotnetInstallDir = DotnetInstallDir;
7302973039DotnetInstallDir.default = {
7303073040 linux: '/usr/share/dotnet',
7303173041 mac: path_1.default.join(process.env['HOME'] + '', '.dotnet'),
73032- windows: path_1.default.join(process.env['PROGRAMFILES'] + '', 'dotnet')
73042+ windows: fixWindowsInstallDir( path_1.default.join(process.env['PROGRAMFILES'] + '', 'dotnet') )
7303373043};
7303473044DotnetInstallDir.dirPath = process.env['DOTNET_INSTALL_DIR']
7303573045 ? DotnetInstallDir.convertInstallPathToAbsolute(process.env['DOTNET_INSTALL_DIR'])
@@ -73272,7 +73282,7 @@ run();
7327273282"use strict";
7327373283
7327473284Object.defineProperty(exports, "__esModule", ({ value: true }));
73275- exports.PLATFORM = exports.IS_WINDOWS = void 0;
73285+ exports.isSelfHosted = exports. PLATFORM = exports.IS_WINDOWS = void 0;
7327673286exports.IS_WINDOWS = process.platform === 'win32';
7327773287exports.PLATFORM = (() => {
7327873288 if (process.platform === 'win32')
@@ -73281,6 +73291,10 @@ exports.PLATFORM = (() => {
7328173291 return 'linux';
7328273292 return 'mac';
7328373293})();
73294+ const isSelfHosted = () => process.env['AGENT_ISSELFHOSTED'] === '1' ||
73295+ (process.env['AGENT_ISSELFHOSTED'] === undefined &&
73296+ process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted');
73297+ exports.isSelfHosted = isSelfHosted;
7328473298
7328573299
7328673300/***/ }),
0 commit comments