Skip to content

Commit 6fad8c8

Browse files
committed
f
1 parent f5af729 commit 6fad8c8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

hooks/_common.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,11 @@ function common::terraform_init {
558558
# The global provider cache is safe for concurrent use by multiple processes for OpenTofu v1.10+
559559
# More details - https://github.com/opentofu/opentofu/pull/1878
560560
# For that reason, we switch to `tofu init` when possible
561-
echo "Using Terraform binary path: $tf_path"
562-
if [[ "$($tf_path -version | head -1 | grep '^Terraform')" == "Terraform" ]] &&
561+
if [[ "$($tf_path -version | head -1 | grep -o '^Terraform')" == "Terraform" ]] &&
563562
common::tofu_version_ge_1.10; then
564563
tf_path=$(command -v tofu)
565564
common::colorify "green" "Using OpenTofu binary ($tf_path) for Terraform init operations, as it supports concurrent provider initialization."
566565
fi
567-
echo "Running 'terraform init' with plugin cache dir: $TF_PLUGIN_CACHE_DIR"
568566

569567
# Locking just doesn't work, and the below works quicker instead. Details:
570568
# https://github.com/hashicorp/terraform/issues/31964#issuecomment-1939869453
@@ -637,7 +635,6 @@ function common::tofu_version_ge_1.10 {
637635

638636
# Extract version number (e.g., "tofu version v1.10.4" -> "1.10")
639637
tofu_version=$(tofu --version 2> /dev/null | grep -oE '[0-9]+\.[0-9]+')
640-
echo "Detected OpenTofu version: $tofu_version"
641638
# If we can't parse version, default to older command
642639
[[ ! $tofu_version ]] && return 1
643640

0 commit comments

Comments
 (0)