From 1580ca8f461b7f70069861001dcd36ab8b768ba7 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 13:26:40 -0500 Subject: [PATCH] use more simple method to get module info --- .github/workflows/module-plugin-test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/module-plugin-test.yml b/.github/workflows/module-plugin-test.yml index 193ba14..a672a19 100644 --- a/.github/workflows/module-plugin-test.yml +++ b/.github/workflows/module-plugin-test.yml @@ -127,18 +127,24 @@ jobs: working-directory: ./vendor/${{ inputs.module-repo }} shell: bash run: | - hasPackageJson=`test -f package.json` - echo "Module has package.json file: $hasPackageJson" - echo "hasPackageJson=$hasPackageJson" >> $GITHUB_OUTPUT + if [[ -f package.json ]] + then + echo "hasPackageJson=true" >> $GITHUB_OUTPUT + else + echo "hasPackageJson=false" >> $GITHUB_OUTPUT + fi - name: Check Module for build script id: build working-directory: ./vendor/${{ inputs.module-repo }} shell: bash run: | - hasBuildCommand=`grep -wq '"build":' package.json` - echo "Module has build command: $hasBuildCommand" - echo "hasBuildCommand=$hasBuildCommand" >> $GITHUB_OUTPUT + if grep -wq '"build":' package.json; + then + echo "hasBuildCommand=true" >> $GITHUB_OUTPUT + else + echo "hasBuildCommand=false" >> $GITHUB_OUTPUT + fi - name: Setup Registry for Module working-directory: ./vendor/${{ inputs.module-repo }}