[TEMP-FIX] Add creating index directory on Windows (#9)

This commit is contained in:
Mieszko Grodzicki 2023-02-21 13:53:34 +01:00 committed by Predrag Gruevski
parent aa69e72300
commit ea31db666e
4 changed files with 10 additions and 3 deletions

4
dist/index.js vendored

File diff suppressed because one or more lines are too long

1
package-lock.json generated
View file

@ -11,6 +11,7 @@
"dependencies": {
"@actions-rs/core": "^0.1.6",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.2",
"@actions/tool-cache": "^2.0.1",

View file

@ -23,7 +23,8 @@
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.2",
"@actions/tool-cache": "^2.0.1",
"@types/node-fetch": "^2.6.2"
"@types/node-fetch": "^2.6.2",
"@actions/exec": "^1.1.1"
},
"devDependencies": {
"@types/node": "^18.11.18",

View file

@ -1,5 +1,6 @@
import os = require('os');
import * as exec from '@actions/exec';
import * as core from '@actions/core';
import * as github from '@actions/github';
import * as io from '@actions/io';
@ -63,6 +64,10 @@ async function installRustUp(): Promise<void> {
await rustup.call(['show']);
await rustup.setProfile('minimal');
await rustup.installToolchain('stable');
// [TODO] Remove this temporary fix once the underlying issue is fixed.
if (os.platform() == 'win32')
exec.exec('mkdir C:\\Users\\runneradmin\\.cargo\\registry\\index');
}
async function runCargoSemverChecks(cargo: rustCore.Cargo): Promise<void> {