diff --git a/src/s-core-devcontainer/.devcontainer/s-core-local/enable_pre_commit_hooks.sh b/src/s-core-devcontainer/.devcontainer/s-core-local/enable_pre_commit_hooks.sh index 33300c5..ee2f6d3 100755 --- a/src/s-core-devcontainer/.devcontainer/s-core-local/enable_pre_commit_hooks.sh +++ b/src/s-core-devcontainer/.devcontainer/s-core-local/enable_pre_commit_hooks.sh @@ -19,7 +19,7 @@ PRE_COMMIT_CONFIG_FILE=".pre-commit-config.yaml" if [[ -f "${PRE_COMMIT_CONFIG_FILE}" ]] then echo "Pre-commit configuration found (${PRE_COMMIT_CONFIG_FILE})" - "${PIPX_BIN_DIR}/pre-commit" install + pre-commit install else echo "No pre-commit configuration found (${PRE_COMMIT_CONFIG_FILE})" echo "Skipping pre-commit hook's installation" diff --git a/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh b/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh index c9d593f..9941134 100755 --- a/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh +++ b/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh @@ -84,6 +84,11 @@ download_and_extract_from_github() { rm "${temp_file}" } +# always add PIPX_BIN_DIR to path +PIPX_BIN_DIR_EXPORT="$(grep "export PIPX_BIN_DIR" /etc/bash.bashrc)" +eval "${PIPX_BIN_DIR_EXPORT}" +echo -e "PATH=\"${PIPX_BIN_DIR}:\$PATH\"\nexport PATH" >> /etc/profile.d/pipx_bin_dir.sh + apt-get update # Unminimize the image to include standard packages like man pages diff --git a/src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.sh b/src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.sh index 54a1cef..842efd4 100755 --- a/src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.sh +++ b/src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.sh @@ -23,7 +23,7 @@ KERNEL=$(uname -s) . /devcontainer/features/s-core-local/versions.sh /devcontainer/features/s-core-local/versions.yaml # pre-commit, it is available via $PATH in login shells, but not in non-login shells -check "validate pre-commit is working and has the correct version" bash -c "${PIPX_BIN_DIR}/pre-commit --version | grep '4.5.1'" +check "validate pre-commit is working and has the correct version" bash -c "pre-commit --version | grep '4.5.1'" # Common tooling check "validate shellcheck is working and has the correct version" bash -c "shellcheck --version | grep '${shellcheck_version}'" @@ -75,6 +75,7 @@ check "validate gh is working and has the correct version" bash -c "gh --version check "validate valgrind is working and has the correct version" bash -c "valgrind --version | grep '${valgrind_version}'" if [ "${ARCHITECTURE}" = "amd64" ] || { [ "${ARCHITECTURE}" = "arm64" ] && [ "${KERNEL}" = "Darwin" ]; }; then check "validate codeql is working and has the correct version" bash -c "codeql --version | grep '${codeql_version}'" + check "validate CODEQL_HOME is set correctly" bash -c "echo ${CODEQL_HOME} | grep \"/usr/local/codeql\"" fi # Qemu target-related tools