mirror of
https://github.com/actions-rs/toolchain.git
synced 2025-09-07 08:41:58 +03:00
Made it possible to add component
This commit is contained in:
parent
8e306a9c7f
commit
9aeef8beba
3 changed files with 10 additions and 2 deletions
|
@ -30,7 +30,8 @@ export interface ToolchainOptions {
|
|||
name: string,
|
||||
target?: string,
|
||||
default: boolean,
|
||||
override: boolean
|
||||
override: boolean,
|
||||
component?: string
|
||||
}
|
||||
|
||||
export function toolchain_args(): ToolchainOptions {
|
||||
|
@ -38,6 +39,7 @@ export function toolchain_args(): ToolchainOptions {
|
|||
name: getInput('toolchain', {required: true}),
|
||||
target: getInput('target') || undefined,
|
||||
default: inputBoolean('default'),
|
||||
override: inputBoolean('override')
|
||||
override: inputBoolean('override'),
|
||||
component: getInput('component') || undefined
|
||||
};
|
||||
}
|
||||
|
|
|
@ -89,6 +89,10 @@ async function run() {
|
|||
if (opts.target) {
|
||||
await exec.exec(rustup, ['target', 'add', '--toolchain', opts.name, opts.target]);
|
||||
}
|
||||
|
||||
if (opts.component) {
|
||||
await exec.exec(rustup, ['component', 'add', opts.component, '--toolchain', opts.name]);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue