diff --git a/static/install-opentofu.sh b/static/install-opentofu.sh index 06da5ed..0279518 100755 --- a/static/install-opentofu.sh +++ b/static/install-opentofu.sh @@ -740,7 +740,7 @@ install_standalone() { if [ "${OPENTOFU_VERSION}" = "latest" ]; then log_info "Determining latest OpenTofu version..." - OPENTOFU_VERSION=$(download_file "https://api.github.com/repos/opentofu/opentofu/releases/latest" - | grep "tag_name" | sed -e 's/.*tag_name":\s*"v//' -e 's/".*//') + OPENTOFU_VERSION=$(download_file "https://api.github.com/repos/opentofu/opentofu/releases/latest" - | grep "tag_name" | sed -e 's/.*tag_name":"v//' -e 's/".*//') if [ -z "${OPENTOFU_VERSION}" ]; then log_error "Failed to obtain the latest release from the GitHub API. Try passing --opentofu-version to specify a version." return "${TOFU_INSTALL_EXIT_CODE_INSTALL_FAILED}"