mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-08 03:36:37 +00:00
Do not use target
input as a --default-target
argument for rustup
This commit is contained in:
parent
15b1f315b5
commit
6715f9d030
5 changed files with 5665 additions and 5633 deletions
10
src/main.ts
10
src/main.ts
|
@ -32,7 +32,7 @@ function downloadRustInit(url: string, name: string): Promise<string> {
|
|||
});
|
||||
}
|
||||
|
||||
async function get_rustup(toolchain: string, target?: string): Promise<string> {
|
||||
async function get_rustup(toolchain: string): Promise<string> {
|
||||
try {
|
||||
const foundPath = await io.which('rustup', true);
|
||||
core.debug(`Found rustup at ${foundPath}`);
|
||||
|
@ -46,10 +46,8 @@ async function get_rustup(toolchain: string, target?: string): Promise<string> {
|
|||
'--default-toolchain',
|
||||
toolchain,
|
||||
];
|
||||
if (target) {
|
||||
args.push('--default-host');
|
||||
args.push(target);
|
||||
}
|
||||
|
||||
// Note: `target` input can't be used here for `--default-host` argument, see #8
|
||||
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
|
@ -74,7 +72,7 @@ async function get_rustup(toolchain: string, target?: string): Promise<string> {
|
|||
|
||||
async function run() {
|
||||
const opts = args.toolchain_args();
|
||||
const rustup = await get_rustup(opts.name, opts.target);
|
||||
const rustup = await get_rustup(opts.name);
|
||||
|
||||
await exec.exec(rustup, ['toolchain', 'install', opts.name]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue