Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions src/s-core-devcontainer/.devcontainer/s-core-local/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}'"
Expand Down Expand Up @@ -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
Expand Down