setup-rust-action/src/main.ts
Héctor Ramón Jiménez d70a4279cf Clean up in general
2019-08-16 02:16:04 +02:00

21 lines
456 B
TypeScript

import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as rustup from './rustup';
import * as os from 'os';
async function run() {
try {
const version = core.getInput('rust-version');
if(version) {
await rustup.install();
await exec.exec('rustup', ['default', version]);
await exec.exec('rustup', ['update', version]);
}
} catch (error) {
core.setFailed(error.message);
}
}
run();