diff --git a/lib/utils.bash b/lib/utils.bash index 65f7f480..dfabb252 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -365,7 +365,7 @@ get_asdf_config_value_from_file() { fi local result - result=$(grep -E "^\\s*$key\\s*=\\s*" "$config_path" | head | sed -e 's/^[^=]*= *//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + result=$(grep -E "^\s*$key\s*=\s*" "$config_path" | head | sed -e 's/^[^=]*= *//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') if [ -n "$result" ]; then printf "%s\\n" "$result" return 0 diff --git a/scripts/update_version_in_docs.bash b/scripts/update_version_in_docs.bash index 4a0d2f29..a40a8961 100755 --- a/scripts/update_version_in_docs.bash +++ b/scripts/update_version_in_docs.bash @@ -3,4 +3,4 @@ set -euo pipefail version=$(cat version.txt) -sed -i "s/\\(git clone.*--branch \\).*\\(\`.*|\\)/\\1v$version\\2/" docs/guide/getting-started.md +sed -i "s/\(git clone.*--branch \).*\(\`.*|\)/\1v$version\2/" docs/guide/getting-started.md diff --git a/scripts/update_version_list_in_security_policy.bash b/scripts/update_version_list_in_security_policy.bash index 3361bbb4..e12877ae 100755 --- a/scripts/update_version_list_in_security_policy.bash +++ b/scripts/update_version_list_in_security_policy.bash @@ -8,5 +8,5 @@ version_major_minor_x="$(cut -f1-2 -d "." version.txt).x" if ! grep -q "$version_major_minor_x" SECURITY.md; then # prepend new version to the list sed -i "s/white_check_mark:/x: /g" SECURITY.md - sed -i "s/^\\(| -* | -* |\\)$/\\1\\n| $version_major_minor_x | :white_check_mark: |/" SECURITY.md + sed -i "s/^\(| -* | -* |\)$/\1\n| $version_major_minor_x | :white_check_mark: |/" SECURITY.md fi diff --git a/test/fixtures/dummy_plugin/bin/latest-stable b/test/fixtures/dummy_plugin/bin/latest-stable index 7210efa3..afe7d1ba 100755 --- a/test/fixtures/dummy_plugin/bin/latest-stable +++ b/test/fixtures/dummy_plugin/bin/latest-stable @@ -4,7 +4,7 @@ get_latest_stable() { query=$1 version_list=(1.0.0 1.1.0 2.0.0) - printf "%s\n" "${version_list[@]}" | grep -E "^\\s*$query" | tail -1 + printf "%s\n" "${version_list[@]}" | grep -E "^\s*$query" | tail -1 } get_latest_stable "$1"