Skip to content

Commit db50ec2

Browse files
committed
[1139] Fixed Code Spells
1 parent b89a41f commit db50ec2

12 files changed

Lines changed: 81 additions & 87 deletions

File tree

src/docker-outside-of-docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

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

6-
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.
6+
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.
77

88
## Example Usage
99

src/docker-outside-of-docker/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.6.2",
44
"name": "Docker (docker-outside-of-docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
6-
"description": "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.",
6+
"description": "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.",
77
"options": {
88
"version": {
99
"type": "string",

src/dotnet/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ for aspNetCoreRuntimeVersion in $(split_csv "$ASPNETCORE_RUNTIME_VERSIONS"); do
7777
aspNetCoreRuntimeVersions+=("$aspNetCoreRuntimeVersion")
7878
done
7979

80-
# Fail fast in case of bad input to avoid unneccesary work
80+
# Fail fast in case of bad input to avoid unnecessary work
8181
# v1 of the .NET feature allowed specifying only a major version 'X' like '3'
8282
# v2 removed this ability
8383
# - because install-dotnet.sh does not support it directly

src/dotnet/scripts/vendor/dotnet-install.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ get_normalized_architecture_for_specific_sdk_version() {
406406

407407
if [ "$osname" == "osx" ] && [ "$architecture" == "arm64" ] && { [ "$is_version_support_arm64" = false ] || [ "$is_channel_support_arm64" = false ]; }; then
408408
#check if rosetta is installed
409-
if [ "$(/usr/bin/pgrep oahd >/dev/null 2>&1;echo $?)" -eq 0 ]; then
410-
say_verbose "Changing user architecture from '$architecture' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
409+
if [ "$(/usr/bin/pgrep oahd >/dev/null 2>&1;echo $?)" -eq 0 ]; then
410+
say_verbose "Changing user architecture from '$architecture' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
411411
echo "x64"
412412
return 0;
413413
else
@@ -428,7 +428,7 @@ is_arm64_supported() {
428428

429429
# Check if the major version is a valid number and less than 6
430430
case "$major_version" in
431-
[0-9]*)
431+
[0-9]*)
432432
if [ "$major_version" -lt 6 ]; then
433433
echo false
434434
return 0
@@ -591,7 +591,7 @@ is_dotnet_package_installed() {
591591
# args:
592592
# downloaded file - $1
593593
# remote_file_size - $2
594-
validate_remote_local_file_sizes()
594+
validate_remote_local_file_sizes()
595595
{
596596
eval $invocation
597597

@@ -604,8 +604,8 @@ validate_remote_local_file_sizes()
604604
elif [[ "$OSTYPE" == "darwin"* ]]; then
605605
# hardcode in order to avoid conflicts with GNU stat
606606
file_size="$(/usr/bin/stat -f '%z' "$downloaded_file")"
607-
fi
608-
607+
fi
608+
609609
if [ -n "$file_size" ]; then
610610
say "Downloaded file size is $file_size bytes."
611611

@@ -616,10 +616,10 @@ validate_remote_local_file_sizes()
616616
say "The remote and local file sizes are equal."
617617
fi
618618
fi
619-
619+
620620
else
621-
say "Either downloaded or local package size can not be measured. One of them may be corrupted."
622-
fi
621+
say "Either downloaded or local package size can not be measured. One of them may be corrupted."
622+
fi
623623
}
624624

625625
# args:
@@ -799,7 +799,7 @@ get_specific_product_version() {
799799
fi
800800
fi
801801
done
802-
802+
803803
# Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number.
804804
say_verbose "Failed to get the version using productVersion.txt file. Download link will be parsed instead."
805805
specific_product_version="$(get_product_specific_version_from_download_link "$package_download_link" "$specific_version")"
@@ -864,7 +864,7 @@ get_product_specific_version_from_download_link()
864864

865865
local download_link="$1"
866866
local specific_version="$2"
867-
local specific_product_version=""
867+
local specific_product_version=""
868868

869869
if [ -z "$download_link" ]; then
870870
echo "$specific_version"
@@ -1055,9 +1055,9 @@ extract_dotnet_package() {
10551055
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
10561056
find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
10571057
find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
1058-
1058+
10591059
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"
1060-
1060+
10611061
rm -rf "$temp_out_path"
10621062
if [ -z ${keep_zip+x} ]; then
10631063
rm -f "$zip_path" && say_verbose "Temporary archive file $zip_path was removed"
@@ -1204,7 +1204,7 @@ downloadcurl() {
12041204
curl $curl_options -o "$out_path" "$remote_path_with_credential" 2>&1
12051205
curl_exit_code=$?
12061206
fi
1207-
1207+
12081208
if [ $curl_exit_code -gt 0 ]; then
12091209
download_error_msg="Unable to download $remote_path."
12101210
# Check for curl timeout codes
@@ -1337,7 +1337,7 @@ get_download_link_from_aka_ms() {
13371337
say_warning "Specifying quality for STS or LTS channel is not supported, the quality will be ignored."
13381338
fi
13391339

1340-
say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
1340+
say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
13411341

13421342
#construct aka.ms link
13431343
aka_ms_link="https://aka.ms/dotnet"
@@ -1538,14 +1538,14 @@ generate_regular_links() {
15381538

15391539
if [ "$valid_legacy_download_link" = true ]; then
15401540
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
1541-
1541+
15421542
download_links+=($legacy_download_link)
15431543
specific_versions+=($specific_version)
15441544
effective_versions+=($effective_version)
15451545
link_types+=("legacy")
15461546
else
15471547
legacy_download_link=""
1548-
say_verbose "Cound not construct a legacy_download_link; omitting..."
1548+
say_verbose "Could not construct a legacy_download_link; omitting..."
15491549
fi
15501550

15511551
# Check if the SDK version is already installed.
@@ -1566,7 +1566,7 @@ print_dry_run() {
15661566

15671567
resolved_version=${specific_versions[0]}
15681568
repeatable_command="./$script_name --version "\""$resolved_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
1569-
1569+
15701570
if [ ! -z "$normalized_quality" ]; then
15711571
repeatable_command+=" --quality "\""$normalized_quality"\"""
15721572
fi
@@ -1863,9 +1863,9 @@ do
18631863
echo " -q,--quality <quality> Download the latest build of specified quality in the channel."
18641864
echo " -Quality"
18651865
echo " The possible values are: daily, signed, validated, preview, GA."
1866-
echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1867-
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1868-
echo " Supported since 5.0 release."
1866+
echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1867+
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1868+
echo " Supported since 5.0 release."
18691869
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality."
18701870
echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
18711871
echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."

src/java/install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pkg_manager_update() {
9191
set +e
9292
stderr_messages=$(${PKG_MGR_CMD} -q check-update 2>&1)
9393
rc=$?
94-
# centos 7 sometimes returns a status of 100 when it apears to work.
94+
# centos 7 sometimes returns a status of 100 when it appears to work.
9595
if [ $rc != 0 ] && [ $rc != 100 ]; then
9696
echo "(Error) ${PKG_MGR_CMD} check-update produced the following error message(s):"
9797
echo "${stderr_messages}"
@@ -202,17 +202,17 @@ find_version_list() {
202202
ifLts="$4"
203203
version_list=$5
204204
java_ver=$6
205-
205+
206206
check_packages jq
207207
all_versions=$(curl -s https://api.adoptium.net/v3/info/available_releases)
208-
if [ "${ifLts}" = "true" ]; then
208+
if [ "${ifLts}" = "true" ]; then
209209
major_version=$(echo "$all_versions" | jq -r '.most_recent_lts')
210210
elif [ "${java_ver}" = "latest" ]; then
211-
major_version=$(echo "$all_versions" | jq -r '.most_recent_feature_release')
211+
major_version=$(echo "$all_versions" | jq -r '.most_recent_feature_release')
212212
else
213213
major_version=$(echo "$java_ver" | cut -d '.' -f 1)
214214
fi
215-
215+
216216
# Remove the hardcoded fallback as this fails for new jdk latest version released ex: 24
217217
# Related Issue: https://github.com/devcontainers/features/issues/1308
218218
if [ "${JDK_DISTRO}" = "ms" ]; then
@@ -255,7 +255,7 @@ sdk_install() {
255255
requested_version="$(echo "${version_list}" | head -n 1)"
256256
elif echo "${requested_version}" | grep -oE "${full_version_check}" > /dev/null 2>&1; then
257257
echo "${requested_version}"
258-
else
258+
else
259259
find_version_list "$prefix" "$suffix" "$install_type" "false" version_list "${requested_version}"
260260
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ]; then
261261
requested_version="$(echo "${version_list}" | head -n 1)"

src/node/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pkg_mgr_update() {
132132
set +e
133133
stderr_messages=$(${PKG_MGR_CMD} -q check-update 2>&1)
134134
rc=$?
135-
# centos 7 sometimes returns a status of 100 when it apears to work.
135+
# centos 7 sometimes returns a status of 100 when it appears to work.
136136
if [ $rc != 0 ] && [ $rc != 100 ]; then
137137
echo "(Error) ${PKG_MGR_CMD} check-update produced the following error message(s):"
138138
echo "${stderr_messages}"
@@ -199,7 +199,7 @@ find_version_from_git_tags() {
199199

200200
install_yarn() {
201201
if [ "${ADJUSTED_ID}" = "debian" ] && [ "${INSTALL_YARN_USING_APT}" = "true" ]; then
202-
# for backward compatiblity with existing devcontainer features, install yarn
202+
# for backward compatibility with existing devcontainer features, install yarn
203203
# via apt-get on Debian systems
204204
if ! type yarn >/dev/null 2>&1; then
205205
# Import key safely (new method rather than deprecated apt-key approach) and install

src/oryx/scripts/vendor/dotnet-install.sh

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ get_normalized_architecture_for_specific_sdk_version() {
406406

407407
if [ "$osname" == "osx" ] && [ "$architecture" == "arm64" ] && { [ "$is_version_support_arm64" = false ] || [ "$is_channel_support_arm64" = false ]; }; then
408408
#check if rosetta is installed
409-
if [ "$(/usr/bin/pgrep oahd >/dev/null 2>&1;echo $?)" -eq 0 ]; then
410-
say_verbose "Changing user architecture from '$architecture' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
409+
if [ "$(/usr/bin/pgrep oahd >/dev/null 2>&1;echo $?)" -eq 0 ]; then
410+
say_verbose "Changing user architecture from '$architecture' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
411411
echo "x64"
412412
return 0;
413413
else
@@ -423,17 +423,11 @@ get_normalized_architecture_for_specific_sdk_version() {
423423
# args:
424424
# version or channel - $1
425425
is_arm64_supported() {
426-
# Extract the major version by splitting on the dot
427-
major_version="${1%%.*}"
428-
429-
# Check if the major version is a valid number and less than 6
430-
case "$major_version" in
431-
[0-9]*)
432-
if [ "$major_version" -lt 6 ]; then
433-
echo false
434-
return 0
435-
fi
436-
;;
426+
#any channel or version that starts with the specified versions
427+
case "$1" in
428+
( "1"* | "2"* | "3"* | "4"* | "5"*)
429+
echo false
430+
return 0
437431
esac
438432

439433
echo true
@@ -591,7 +585,7 @@ is_dotnet_package_installed() {
591585
# args:
592586
# downloaded file - $1
593587
# remote_file_size - $2
594-
validate_remote_local_file_sizes()
588+
validate_remote_local_file_sizes()
595589
{
596590
eval $invocation
597591

@@ -604,8 +598,8 @@ validate_remote_local_file_sizes()
604598
elif [[ "$OSTYPE" == "darwin"* ]]; then
605599
# hardcode in order to avoid conflicts with GNU stat
606600
file_size="$(/usr/bin/stat -f '%z' "$downloaded_file")"
607-
fi
608-
601+
fi
602+
609603
if [ -n "$file_size" ]; then
610604
say "Downloaded file size is $file_size bytes."
611605

@@ -616,10 +610,10 @@ validate_remote_local_file_sizes()
616610
say "The remote and local file sizes are equal."
617611
fi
618612
fi
619-
613+
620614
else
621-
say "Either downloaded or local package size can not be measured. One of them may be corrupted."
622-
fi
615+
say "Either downloaded or local package size can not be measured. One of them may be corrupted."
616+
fi
623617
}
624618

625619
# args:
@@ -799,7 +793,7 @@ get_specific_product_version() {
799793
fi
800794
fi
801795
done
802-
796+
803797
# Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number.
804798
say_verbose "Failed to get the version using productVersion.txt file. Download link will be parsed instead."
805799
specific_product_version="$(get_product_specific_version_from_download_link "$package_download_link" "$specific_version")"
@@ -864,7 +858,7 @@ get_product_specific_version_from_download_link()
864858

865859
local download_link="$1"
866860
local specific_version="$2"
867-
local specific_product_version=""
861+
local specific_product_version=""
868862

869863
if [ -z "$download_link" ]; then
870864
echo "$specific_version"
@@ -1055,9 +1049,9 @@ extract_dotnet_package() {
10551049
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
10561050
find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
10571051
find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
1058-
1052+
10591053
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"
1060-
1054+
10611055
rm -rf "$temp_out_path"
10621056
if [ -z ${keep_zip+x} ]; then
10631057
rm -f "$zip_path" && say_verbose "Temporary archive file $zip_path was removed"
@@ -1204,7 +1198,7 @@ downloadcurl() {
12041198
curl $curl_options -o "$out_path" "$remote_path_with_credential" 2>&1
12051199
curl_exit_code=$?
12061200
fi
1207-
1201+
12081202
if [ $curl_exit_code -gt 0 ]; then
12091203
download_error_msg="Unable to download $remote_path."
12101204
# Check for curl timeout codes
@@ -1337,7 +1331,7 @@ get_download_link_from_aka_ms() {
13371331
say_warning "Specifying quality for STS or LTS channel is not supported, the quality will be ignored."
13381332
fi
13391333

1340-
say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
1334+
say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
13411335

13421336
#construct aka.ms link
13431337
aka_ms_link="https://aka.ms/dotnet"
@@ -1538,14 +1532,14 @@ generate_regular_links() {
15381532

15391533
if [ "$valid_legacy_download_link" = true ]; then
15401534
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
1541-
1535+
15421536
download_links+=($legacy_download_link)
15431537
specific_versions+=($specific_version)
15441538
effective_versions+=($effective_version)
15451539
link_types+=("legacy")
15461540
else
15471541
legacy_download_link=""
1548-
say_verbose "Cound not construct a legacy_download_link; omitting..."
1542+
say_verbose "Could not construct a legacy_download_link; omitting..."
15491543
fi
15501544

15511545
# Check if the SDK version is already installed.
@@ -1566,7 +1560,7 @@ print_dry_run() {
15661560

15671561
resolved_version=${specific_versions[0]}
15681562
repeatable_command="./$script_name --version "\""$resolved_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
1569-
1563+
15701564
if [ ! -z "$normalized_quality" ]; then
15711565
repeatable_command+=" --quality "\""$normalized_quality"\"""
15721566
fi
@@ -1863,9 +1857,9 @@ do
18631857
echo " -q,--quality <quality> Download the latest build of specified quality in the channel."
18641858
echo " -Quality"
18651859
echo " The possible values are: daily, signed, validated, preview, GA."
1866-
echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1867-
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1868-
echo " Supported since 5.0 release."
1860+
echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1861+
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1862+
echo " Supported since 5.0 release."
18691863
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality."
18701864
echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
18711865
echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."

0 commit comments

Comments
 (0)