0
0
Fork 0
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:
Rin Arakaki 2023-02-13 03:19:08 +09:00 committed by GitHub
parent a8590368be
commit 4c16962101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {