From 3f110efd4ab3f738f93c2f21cf7e0368a4f855e3 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 11 May 2021 11:51:44 +0100 Subject: [PATCH] fix: Fix possible changes to users' go.mod files CY-4272 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 1f765fd..676d510 100644 --- a/action.yml +++ b/action.yml @@ -151,7 +151,7 @@ runs: chmod +x /tmp/codacy-staticcheck cd - - find . -type f -name go.mod -exec bash -c 'cd $(dirname $1); PKGS=$(go list ./...); git checkout $1; /tmp/staticcheck/staticcheck -f json $PKGS' _ {} \; > /tmp/staticcheck-out.json + find . -type f -name go.mod -exec bash -c 'cd $(dirname $1); cp $1 $1.codacy.bkp; PKGS=$(go list ./...); /tmp/staticcheck/staticcheck -f json $PKGS; mv $1.codacy.bkp $1' _ {} \; > /tmp/staticcheck-out.json /tmp/codacy-staticcheck < /tmp/staticcheck-out.json > /tmp/codacy-out.json if [ ${{ inputs.upload }} = true ]; then curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \