mirror of
https://github.com/actions-rs/toolchain.git
synced 2024-12-22 15:45:49 +02: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
17
CHANGELOG.md
Normal file
17
CHANGELOG.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.1] - 2019-10-05
|
||||
|
||||
### Changed
|
||||
|
||||
- `target` input is not used as a `--default-target` argument for `rustup` anymore (#8)
|
||||
|
||||
## [1.0.0] - 2019-09-15
|
||||
|
||||
### Added
|
||||
|
||||
- First public version
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
11267
package-lock.json
generated
11267
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "rust-toolchain",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"private": false,
|
||||
"description": "Install the Rust toolchain",
|
||||
"main": "lib/main.js",
|
||||
|
|
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…
Reference in a new issue