Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Fix rustup download & installation on Windows #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/commands/rustup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { promises as fs } from 'fs';
import * as path from 'path';
import * as process from 'process';
import * as os from 'os';

import * as semver from 'semver';
import * as io from '@actions/io';
Expand Down Expand Up @@ -73,8 +74,11 @@ export class RustUp {
}

case 'win32': {
const downloadPath = path.join(os.tmpdir(), "rustup-init.exe");
await fs.rm(downloadPath, { force: true });
const rustupExe = await tc.downloadTool(
'https://win.rustup.rs',
downloadPath,
);
await exec.exec(rustupExe, args);
break;
Expand Down