mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-20 09:38:43 +00:00
fix: Fix rust value extraction.
This commit is contained in:
parent
fbe11a6179
commit
d939750e00
2 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@moonrepo/setup-rust",
|
"name": "@moonrepo/setup-rust",
|
||||||
"version": "0.3.2",
|
"version": "0.3.3",
|
||||||
"description": "A GitHub action for setting up Rust and Cargo.",
|
"description": "A GitHub action for setting up Rust and Cargo.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -18,14 +18,16 @@ export async function extractRustVersion(toolchain: string) {
|
||||||
});
|
});
|
||||||
|
|
||||||
out.split('\n').forEach((line) => {
|
out.split('\n').forEach((line) => {
|
||||||
|
if (line.startsWith('commit-hash')) {
|
||||||
const value = line.split(':')[1].trim();
|
const value = line.split(':')[1].trim();
|
||||||
|
|
||||||
if (line.startsWith('commit-hash')) {
|
|
||||||
core.setOutput('rust-hash', value);
|
core.setOutput('rust-hash', value);
|
||||||
RUST_HASH = value;
|
RUST_HASH = value;
|
||||||
|
|
||||||
// version
|
// version
|
||||||
} else if (line.startsWith('release')) {
|
} else if (line.startsWith('release')) {
|
||||||
|
const value = line.split(':')[1].trim();
|
||||||
|
|
||||||
core.setOutput('rust-version', value);
|
core.setOutput('rust-version', value);
|
||||||
RUST_VERSION = value;
|
RUST_VERSION = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue