mirror of
https://github.com/actions-rs/cargo.git
synced 2025-06-02 23:13:38 +03:00
Update input.js
This commit is contained in:
parent
be366a5483
commit
ba60d415cf
1 changed files with 10 additions and 11 deletions
21
src/input.js
21
src/input.js
|
@ -7,14 +7,14 @@ import { input } from "action-core";
|
||||||
import stringArgv from "string-argv";
|
import stringArgv from "string-argv";
|
||||||
|
|
||||||
// Parsed action input
|
// Parsed action input
|
||||||
export interface Input {
|
// export interface Input {
|
||||||
command: string;
|
// command: string;
|
||||||
toolchain?: string;
|
// toolchain?: string;
|
||||||
args: string[];
|
// args: string[];
|
||||||
useCross: boolean;
|
// useCross: boolean;
|
||||||
}
|
// }
|
||||||
|
|
||||||
export function get(): Input {
|
export function get() {
|
||||||
const command = input.getInput("command", { required: true });
|
const command = input.getInput("command", { required: true });
|
||||||
const args = stringArgv(input.getInput("args"));
|
const args = stringArgv(input.getInput("args"));
|
||||||
let toolchain = input.getInput("toolchain");
|
let toolchain = input.getInput("toolchain");
|
||||||
|
@ -22,11 +22,10 @@ export function get(): Input {
|
||||||
toolchain = toolchain.slice(1);
|
toolchain = toolchain.slice(1);
|
||||||
}
|
}
|
||||||
const useCross = input.getInputBool("use-cross");
|
const useCross = input.getInputBool("use-cross");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
command: command,
|
command,
|
||||||
args: args,
|
args,
|
||||||
useCross: useCross,
|
useCross,
|
||||||
toolchain: toolchain || undefined,
|
toolchain: toolchain || undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue