From eb6667491c54d844e834f1711a13c8bd7606b674 Mon Sep 17 00:00:00 2001 From: Zimo Li <7163127+lzm0@users.noreply.github.com> Date: Tue, 21 May 2024 15:39:35 -0400 Subject: [PATCH] Match from the beginning of line when validating Yarn version --- yarn/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn/action.yml b/yarn/action.yml index d80b5cd..db568c3 100644 --- a/yarn/action.yml +++ b/yarn/action.yml @@ -116,7 +116,7 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} run: | - if yarn --version | grep -q '1\.'; then + if yarn --version | grep -q '^1\.'; then echo "::error ::Yarn Classic (1.x) is not supported. Please upgrade to Yarn Berry." exit 1 fi