diff --git a/.github/workflows/python-deps.yml b/.github/workflows/python-deps.yml
index f1145af45..18391d005 100644
--- a/.github/workflows/python-deps.yml
+++ b/.github/workflows/python-deps.yml
@@ -62,8 +62,13 @@ jobs:
     - name: Setup for extractor
       run: |
         echo $CODEQL_PYTHON
+        unameOut="$(uname -s)"
+        case "${true}" in
+            Linux*)     true="/bin/true";;
+            Darwin*)    true="/usr/bin/true";;
+        esac
         # only run if $CODEQL_PYTHON is set
-        test ! -z $CODEQL_PYTHON && $GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON || /bin/true
+        test ! -z $CODEQL_PYTHON && $GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON || ${true}
     - name: Verify packages installed
       run: |
         ${{ matrix.test_script }}
\ No newline at end of file