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

Commit

Permalink
Fix rustup download & installation on Windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lionel-faber committed Jan 3, 2022
1 parent 4487ec1 commit b6efa9c
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit b6efa9c

Please sign in to comment.