0
0
Fork 0
mirror of https://github.com/actions-rs/cargo.git synced 2025-05-04 01:29:21 +03:00

Update input.js

This commit is contained in:
Rin Arakaki 2023-02-13 03:35:48 +09:00 committed by GitHub
parent be366a5483
commit ba60d415cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,14 +7,14 @@ import { input } from "action-core";
import stringArgv from "string-argv";
// Parsed action input
export interface Input {
command: string;
toolchain?: string;
args: string[];
useCross: boolean;
}
// export interface Input {
// command: string;
// toolchain?: string;
// args: string[];
// useCross: boolean;
// }
export function get(): Input {
export function get() {
const command = input.getInput("command", { required: true });
const args = stringArgv(input.getInput("args"));
let toolchain = input.getInput("toolchain");
@ -22,11 +22,10 @@ export function get(): Input {
toolchain = toolchain.slice(1);
}
const useCross = input.getInputBool("use-cross");
return {
command: command,
args: args,
useCross: useCross,
command,
args,
useCross,
toolchain: toolchain || undefined,
};
}