mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-10 13:22:20 +02:00
Handle each OS in its own way
This commit is contained in:
parent
7199395312
commit
5d9fdcab75
2 changed files with 9 additions and 5 deletions
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
|
@ -5325,8 +5325,11 @@ function cacheDependencies(cache, pythonVersion) {
|
|||
function run() {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
|
||||
process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
|
||||
if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
|
||||
if (utils_1.IS_LINUX)
|
||||
process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
|
||||
else
|
||||
process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
|
||||
}
|
||||
core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
|
||||
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue