mirror of
https://github.com/actions-rs/toolchain.git
synced 2025-09-08 17:21:56 +03:00
Allow to override toolchain from rust-toolchain file (#35)
This commit is contained in:
parent
e2aeba25b2
commit
6a1db6369e
10 changed files with 168 additions and 34 deletions
|
@ -1,12 +1,16 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
import path from "path";
|
||||
|
||||
import * as args from './args';
|
||||
import {RustUp, ToolchainOptions} from '@actions-rs/core';
|
||||
|
||||
async function run() {
|
||||
const opts = args.toolchain_args();
|
||||
// we use path.join to make sure this works on Windows, Linux and MacOS
|
||||
let toolchainOverrideFile = path.join(process.cwd(), "rust-toolchain");
|
||||
|
||||
const opts = args.toolchain_args(toolchainOverrideFile);
|
||||
const rustup = await RustUp.getOrInstall();
|
||||
await rustup.call(['show']);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue