Skip to content

Commit 4d7e3de

Browse files
committed
feat: add warnings for command
1 parent 8acb582 commit 4d7e3de

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/codeql-init

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ for CODEQL_LANGUAGE in ${CODEQL_LANGUAGES//,/ } ; do
8383

8484
if [ "$CODEQL_TRACING" = "1" ] && [[ "$CODEQL_LANGUAGE" =~ ^(cpp|csharp|java|go)$ ]]; then
8585
debug "Swap to a init command and add --begin-tracing"
86+
87+
# check if the OS is Mac
88+
if [[ "$OSTYPE" == "darwin"* ]]; then
89+
warning "Tracing on MacOS can have issues with the CodeQL CLI"
90+
warning "See https://docs.github.com/en/enterprise-cloud@latest/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#using-indirect-build-tracing"
91+
fi
92+
8693
# https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#using-indirect-build-tracing
8794
CODEQL_CREATE="$CODEQL_BINARY database init --begin-tracing --language=$CODEQL_LANGUAGE --source-root=$WORKSPACE $CODEQL_DATABASE"
8895
else

0 commit comments

Comments
 (0)