From 7fea98d57d3ebacb020215d14023110536b704c6 Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Wed, 7 Dec 2022 12:13:36 -0700 Subject: [PATCH] Replace yq with toml-cli and jq --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 0f930ad..01e5684 100644 --- a/action.yml +++ b/action.yml @@ -13,9 +13,9 @@ runs: if: "${{ env.RUST_VERSION == '' }}" run: | set -e - # yq includes tomlq - pip3 install yq 2>&1 1>/dev/null - echo "RUST_VERSION=$(tomlq -r ".package.rust" Cargo.toml 2>/dev/null || echo stable)" >> $GITHUB_ENV + # Install toml to json cli + npm i -g toml-cli + echo "RUST_VERSION=$(cat Cargo.toml 2>/dev/null | toml | jq -r 'try(.package.rust) // "stable"')" >> $GITHUB_ENV # Clean older versions of rustfmt and cargo-fmt to prevent warnings rm -f /home/runner/.cargo/bin/rustfmt rm -f /home/runner/.cargo/bin/cargo-fmt