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

Commit b6efa9c

Browse files
committed
Fix rustup download & installation on Windows
when downloading the rustup-init binary for installation on Windows it should be named rustup-init.exe in order to be executable on the runner
1 parent 4487ec1 commit b6efa9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/commands/rustup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { promises as fs } from 'fs';
22
import * as path from 'path';
33
import * as process from 'process';
4+
import * as os from 'os';
45

56
import * as semver from 'semver';
67
import * as io from '@actions/io';
@@ -73,8 +74,11 @@ export class RustUp {
7374
}
7475

7576
case 'win32': {
77+
const downloadPath = path.join(os.tmpdir(), "rustup-init.exe");
78+
await fs.rm(downloadPath, { force: true });
7679
const rustupExe = await tc.downloadTool(
7780
'https://win.rustup.rs',
81+
downloadPath,
7882
);
7983
await exec.exec(rustupExe, args);
8084
break;

0 commit comments

Comments
 (0)