From e9c38617b61182606247f57a26307a8402ee5732 Mon Sep 17 00:00:00 2001 From: Kyle Buller Date: Wed, 16 Sep 2020 23:13:05 -0500 Subject: [PATCH] Don't put the config download in a fold --- action.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index a2c8e0f..476c831 100644 --- a/action.yml +++ b/action.yml @@ -32,8 +32,7 @@ inputs: runs: using: composite steps: - - name: Install luacheck - run: | + - run: | echo "##[group]Install luacheck" if ! hash luacheck &>/dev/null; then sudo apt-get install -yq luarocks 1>/dev/null || exit 1 @@ -44,16 +43,14 @@ runs: luacheck --version echo "##[endgroup]" shell: bash - - name: Install .luacheckrc - run: | + - run: | [ -z "${{ inputs.config }}" ] && exit 0 - echo "##[group]Install .luacheckrc" mkdir -p ~/.config/luacheck - echo "##[command]curl -fsSL ${{ inputs.config }}" - curl -fsSL ${{ inputs.config }} > ~/.config/luacheck/.luacheckrc - echo "##[endgroup]" + curl -fsSL "${{ inputs.config }}" -o ~/.config/luacheck/.luacheckrc || { + echo "Unable to download \"${{ inputs.config }}\"" >&2 + exit 1 + } shell: bash - - name: Run luacheck - run: luacheck ${{ inputs.args }} -- ${{ inputs.files }} + - run: luacheck ${{ inputs.args }} -- ${{ inputs.files }} working-directory: ${{ inputs.path }} shell: bash