mirror of
https://github.com/actions-rs/cargo.git
synced 2025-05-04 01:29:21 +03:00
Update and rename main.ts to main.js
This commit is contained in:
parent
a8590368be
commit
4c16962101
1 changed files with 3 additions and 5 deletions
|
@ -5,7 +5,7 @@ import * as core from "@actions/core";
|
|||
import * as input from "./input";
|
||||
import { Cargo, Cross } from "action-core";
|
||||
|
||||
export async function run(actionInput: input.Input): Promise<void> {
|
||||
export async function run(actionInput: input.Input) {
|
||||
let program;
|
||||
if (actionInput.useCross) {
|
||||
program = await Cross.getOrInstall();
|
||||
|
@ -13,7 +13,7 @@ export async function run(actionInput: input.Input): Promise<void> {
|
|||
program = await Cargo.get();
|
||||
}
|
||||
|
||||
let args: string[] = [];
|
||||
let args = [];
|
||||
if (actionInput.toolchain) {
|
||||
args.push(`+${actionInput.toolchain}`);
|
||||
}
|
||||
|
@ -23,12 +23,10 @@ export async function run(actionInput: input.Input): Promise<void> {
|
|||
await program.call(args);
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
async function main() {
|
||||
const matchersPath = path.join(__dirname, ".matchers");
|
||||
console.log(`::add-matcher::${path.join(matchersPath, "rust.json")}`);
|
||||
|
||||
const actionInput = input.get();
|
||||
|
||||
try {
|
||||
await run(actionInput);
|
||||
} catch (error) {
|
Loading…
Add table
Add a link
Reference in a new issue