Skip to content

Commit

Permalink
Pass git param in clone command to avoid changing global config
Browse files Browse the repository at this point in the history
  • Loading branch information
KashifSaadat committed Apr 22, 2022
1 parent b411cea commit 2a681e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ if $RUN_CHECKOV_POLICIES ; then
echo "Policy Package: ${POLICY_SOURCE}:${POLICY_VERSION}"

echo "Fetching Policies..."
git config --global advice.detachedHead false
git clone --quiet --depth 1 --branch ${POLICY_VERSION} ${POLICY_SOURCE} ${POLICY_REPO_DIR}
git -c advice.detachedHead=false clone --quiet --depth 1 --branch ${POLICY_VERSION} ${POLICY_SOURCE} ${POLICY_REPO_DIR}
echo "Policies fetched."

echo "Running checkov policies..."
Expand Down

0 comments on commit 2a681e3

Please sign in to comment.