mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-20 01:28: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",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"description": "A GitHub action for setting up Rust and Cargo.",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -18,14 +18,16 @@ export async function extractRustVersion(toolchain: string) {
|
|||
});
|
||||
|
||||
out.split('\n').forEach((line) => {
|
||||
const value = line.split(':')[1].trim();
|
||||
|
||||
if (line.startsWith('commit-hash')) {
|
||||
const value = line.split(':')[1].trim();
|
||||
|
||||
core.setOutput('rust-hash', value);
|
||||
RUST_HASH = value;
|
||||
|
||||
// version
|
||||
} else if (line.startsWith('release')) {
|
||||
const value = line.split(':')[1].trim();
|
||||
|
||||
core.setOutput('rust-version', value);
|
||||
RUST_VERSION = value;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue