From daa4e6b569447d66ac30fd9f61bba012a72aa080 Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 6 May 2020 10:33:18 +0200 Subject: [PATCH] Moved git changed out of the function --- entrypoint.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ea3ce32..ba317d1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,11 +20,6 @@ EOF git config --global user.name "GitHub Action" } -# Checks if any files are changed -_git_changed() { - [[ -n "$(git status -s)" ]] -} - echo "Installing autopep8..." pip install -q --upgrade pip pip install -q autopep8 @@ -32,7 +27,7 @@ pip install -q autopep8 echo "Running autopep8..." autopep8 -i -r $INPUT_CHECKPATH $INPUT_OPTIONS || echo "Problem running autopep8!" -if _git_changed; +if [[ -n "$(git status -s)" ]]; then if $INPUT_DRY; then echo "Found non-compliant files!"