Do not use target input as a --default-target argument for rustup

This commit is contained in:
svartalf 2019-10-05 23:46:29 +03:00
parent 15b1f315b5
commit 6715f9d030
5 changed files with 5665 additions and 5633 deletions

View file

@ -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]);