Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion src/docker-outside-of-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Docker (docker-outside-of-docker) (docker-outside-of-docker)

Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.
Reuse the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.

## Example Usage

Expand Down
12 changes: 6 additions & 6 deletions src/java/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pkg_manager_update() {
set +e
stderr_messages=$(${PKG_MGR_CMD} -q check-update 2>&1)
rc=$?
# centos 7 sometimes returns a status of 100 when it apears to work.
# centos 7 sometimes returns a status of 100 when it appears to work.
if [ $rc != 0 ] && [ $rc != 100 ]; then
echo "(Error) ${PKG_MGR_CMD} check-update produced the following error message(s):"
echo "${stderr_messages}"
Expand Down Expand Up @@ -202,17 +202,17 @@ find_version_list() {
ifLts="$4"
version_list=$5
java_ver=$6

check_packages jq
all_versions=$(curl -s https://api.adoptium.net/v3/info/available_releases)
if [ "${ifLts}" = "true" ]; then
if [ "${ifLts}" = "true" ]; then
major_version=$(echo "$all_versions" | jq -r '.most_recent_lts')
elif [ "${java_ver}" = "latest" ]; then
major_version=$(echo "$all_versions" | jq -r '.most_recent_feature_release')
major_version=$(echo "$all_versions" | jq -r '.most_recent_feature_release')
else
major_version=$(echo "$java_ver" | cut -d '.' -f 1)
fi

# Remove the hardcoded fallback as this fails for new jdk latest version released ex: 24
# Related Issue: https://github.com/devcontainers/features/issues/1308
if [ "${JDK_DISTRO}" = "ms" ]; then
Expand Down Expand Up @@ -255,7 +255,7 @@ sdk_install() {
requested_version="$(echo "${version_list}" | head -n 1)"
elif echo "${requested_version}" | grep -oE "${full_version_check}" > /dev/null 2>&1; then
echo "${requested_version}"
else
else
find_version_list "$prefix" "$suffix" "$install_type" "false" version_list "${requested_version}"
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ]; then
requested_version="$(echo "${version_list}" | head -n 1)"
Expand Down
4 changes: 2 additions & 2 deletions src/node/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pkg_mgr_update() {
set +e
stderr_messages=$(${PKG_MGR_CMD} -q check-update 2>&1)
rc=$?
# centos 7 sometimes returns a status of 100 when it apears to work.
# centos 7 sometimes returns a status of 100 when it appears to work.
if [ $rc != 0 ] && [ $rc != 100 ]; then
echo "(Error) ${PKG_MGR_CMD} check-update produced the following error message(s):"
echo "${stderr_messages}"
Expand Down Expand Up @@ -199,7 +199,7 @@ find_version_from_git_tags() {

install_yarn() {
if [ "${ADJUSTED_ID}" = "debian" ] && [ "${INSTALL_YARN_USING_APT}" = "true" ]; then
# for backward compatiblity with existing devcontainer features, install yarn
# for backward compatibility with existing devcontainer features, install yarn
# via apt-get on Debian systems
if ! type yarn >/dev/null 2>&1; then
# Import key safely (new method rather than deprecated apt-key approach) and install
Expand Down
2 changes: 1 addition & 1 deletion src/python/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ install_python() {
fi
if [ ! -d "${current_bin_path}" ] ; then
mkdir -p "${current_bin_path}"
# Add an interpreter symlink but point it to "/usr" since python is at /usr/bin/python, add other alises
# Add an interpreter symlink but point it to "/usr" since python is at /usr/bin/python, add other aliases
ln -s "${INSTALL_PATH}/bin/python3" "${current_bin_path}/python3"
ln -s "${INSTALL_PATH}/bin/python3" "${current_bin_path}/python"
ln -s "${INSTALL_PATH}/bin/pydoc3" "${current_bin_path}/pydoc3"
Expand Down
2 changes: 1 addition & 1 deletion test/aws-cli/checkBashCompletion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo -e "Checking completion for command '$command'..."
# Also note the 'y' which responds to the possible Bash question "Display all xxx possibilities? (y or n)".
# Bash produces the autocompletion output on stderr, so redirect that to stdout.
# The sed bit captures the lines between Header and Footer (used as output delimiters).
# The first grep removes the "Display all" message (that is atomatically answered to "y" by the script).
# The first grep removes the "Display all" message (that is automatically answered to "y" by the script).
# The last grep filters the output to lines containing the expected result.
COMPLETE_OUTPUT=$(echo if false\; then "Header"\; $command$'\t'$'\t'y\; "Footer" fi | bash -i 2>&1 | sed -n '/Header/{:a;n;/Footer/q;p;ba}' | grep -v ^'Display all ')
echo -e "\nCompletion output:\n"
Expand Down
2 changes: 1 addition & 1 deletion test/kubectl-helm-minikube/checkBashCompletion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo -e "Checking completion for command '$command'..."
# Also note the 'y' which responds to the possible Bash question "Display all xxx possibilities? (y or n)".
# Bash produces the autocompletion output on stderr, so redirect that to stdout.
# The sed bit captures the lines between Header and Footer (used as output delimiters).
# The first grep removes the "Display all" message (that is atomatically answered to "y" by the script).
# The first grep removes the "Display all" message (that is automatically answered to "y" by the script).
# The last grep filters the output to lines containing the expected result.
COMPLETE_OUTPUT=$(echo if false\; then "Header"\; $command$'\t'$'\t'y\; "Footer" fi | bash -i 2>&1 | sed -n '/Header/{:a;n;/Footer/q;p;ba}' | grep -v ^'Display all ')
echo -e "\nCompletion output:\n"
Expand Down
16 changes: 8 additions & 8 deletions test/powershell/install_powershell_fallback_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ find_version_from_git_tags() {
local repository=$2
local prefix=${3:-"tags/v"}
local separator=${4:-"."}
local last_part_optional=${5:-"false"}
local last_part_optional=${5:-"false"}
if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then
local escaped_separator=${separator//./\\.}
local last_part
Expand Down Expand Up @@ -85,7 +85,7 @@ find_prev_version_from_git_tags() {
((breakfix=breakfix-1))
if [ "${breakfix}" = "0" ] && [ "${last_part_optional}" = "true" ]; then
declare -g ${variable_name}="${major}.${minor}"
else
else
declare -g ${variable_name}="${major}.${minor}.${breakfix}"
fi
fi
Expand All @@ -102,10 +102,10 @@ get_previous_version() {

output=$(curl -s "$repo_url");
message=$(echo "$output" | jq -r '.message')

if [ $mode == "mode1" ]; then
message="API rate limit exceeded"
else
else
message=""
fi

Expand All @@ -114,11 +114,11 @@ get_previous_version() {
echo -e "\nAttempting to find latest version using GitHub tags."
find_prev_version_from_git_tags prev_version "$url" "tags/v"
declare -g ${variable_name}="${prev_version}"
else
else
echo -e "\nAttempting to find latest version using GitHub Api."
version=$(echo "$output" | jq -r '.tag_name')
declare -g ${variable_name}="${version#v}"
fi
fi
echo "${variable_name}=${!variable_name}"
}

Expand Down Expand Up @@ -156,15 +156,15 @@ install_using_github() {
pwsh_url="https://github.com/PowerShell/PowerShell"
POWERSHELL_VERSION="7.4.xyz"
install_pwsh "${POWERSHELL_VERSION}"
if grep -q "Not Found" "${powershell_filename}"; then
if grep -q "Not Found" "${powershell_filename}"; then
install_prev_pwsh $pwsh_url $mode
fi

# Ugly - but only way to get sha256 is to parse release HTML. Remove newlines and tags, then look for filename followed by 64 hex characters.
sudo curl -sSL -o "release.html" "https://github.com/PowerShell/PowerShell/releases/tag/v${POWERSHELL_VERSION}"
powershell_archive_sha256="$(cat release.html | tr '\n' ' ' | sed 's|<[^>]*>||g' | grep -oP "${powershell_filename}\s+\K[0-9a-fA-F]{64}" || echo '')"
if [ -z "${powershell_archive_sha256}" ]; then
echo "(!) WARNING: Failed to retrieve SHA256 for archive. Skipping validaiton."
echo "(!) WARNING: Failed to retrieve SHA256 for archive. Skipping validation."
else
echo "SHA256: ${powershell_archive_sha256}"
echo "${powershell_archive_sha256} *${powershell_filename}" | sha256sum -c -
Expand Down