File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,20 @@ jobs:
6262 CODEQL_REPOSITORY_PATH="${CODEQL_REPOSITORY_PATH:-$HOME/.codeql/codeql-ql}"
6363 CODEQL_SUITE="${CODEQL_SUITE:-$CODEQL_REPOSITORY_PATH/ql/ql/src/codeql-suites/ql-code-scanning.qls}"
6464
65- if which codeql >/dev/null; then
65+ # Glob for Actions toolcache
66+ CODEQL_GLOB='$RUNNER_TOOL_CACHE/CodeQL/*/x64/codeql/codeql'
67+
68+ if [ -f "$CODEQL_GLOB" ]; then
69+ CODEQL_BINARY=$(echo $CODEQL_GLOB)
70+ elif which codeql >/dev/null; then
6671 CODEQL_BINARY="codeql"
6772 elif gh codeql >/dev/null; then
6873 CODEQL_BINARY="gh codeql"
6974 else
7075 gh extension install github/gh-codeql
7176 CODEQL_BINARY="gh codeql"
7277 fi
78+ echo "[+] Using codeql binary: $CODEQL_BINARY"
7379
7480 $CODEQL_BINARY database create \
7581 --language ql --overwrite \
You can’t perform that action at this time.
0 commit comments