Repository: gruntwork-io/terragrunt (language: go)

Issue:
"Unable to open CLI configuration file" warnings on `run-all`, but not otherwise
## Describe the bug

"Unable to open CLI configuration file" warning gets printed on `run-all`, for every module/directory it's being run for. The 'regular' `apply` does not output such warning.

Both regular and `run-all`-qualified `apply` otherwise work, so this is (likely) only a minor issue.

`destroy` mirrors the issue: OK for 'regular' `destroy`, but not with `run-all`.

## Steps To Reproduce

Run `terragrunt run-all --terragrunt-non-interactive apply`.

Observe the following:
```sh
STDERR [iam/user] terraform: There are some problems with the CLI configuration:
STDERR [iam/user] terraform: ╷
STDERR [iam/user] terraform: │ Warning: Unable to open CLI configuration file
STDERR [iam/user] terraform: │
STDERR [iam/user] terraform: │ The CLI configuration file at
STDERR [iam/user] terraform: │ "../../../../../../.terragrunt-cache/DTyRz567eByiMQjHW61J0_x5xto/GIn7EOUM2NNrWty_kE7U-Qe-vY4/module/.terraformrc"
STDERR [iam/user] terraform: │ does not exist.
STDERR [iam/user] terraform: ╵
```



`~/.terraformrc` content:
```ini
plugin_cache_dir   = "$HOME/.terraform.d/plugin-cache"
disable_checkpoint = true
```

## Expected behavior

No warning on `run-all`.

## Versions

- Terragrunt version: v0.77.9
- OpenTofu/Terraform version: v1.11.3
- Environment details (Ubuntu 20.04, Windows 10, etc.): darwin_arm64

These env-vars are set:
```sh
  export TERRAGRUNT_PROVIDER_CACHE=1
  export TERRAGRUNT_PROVIDER_CACHE_DIR=~/.terragrunt-cache

  ## https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_in_automation
  export TF_IN_AUTOMATION=1

  ## https://github.com/gruntwork-io/terragrunt/blob/main/docs/_docs/04_reference/cli-options.md#terragrunt-log-level
  export TERRAGRUNT_LOG_LEVEL=error
  export TF_LOG=ERROR
```



Discussion / hints:

Fix patch:
diff --git a/cli/provider_cache.go b/cli/provider_cache.go
index ef51c1a0df..c4e30c9f11 100644
--- a/cli/provider_cache.go
+++ b/cli/provider_cache.go
@@ -144,10 +144,7 @@ func (cache *ProviderCache) TerraformCommandHook(
 		cliConfigFilename = absPath
 	}
 
-	var (
-		env                  = providerCacheEnvironment(opts, cliConfigFilename)
-		skipRunTargetCommand bool
-	)
+	var skipRunTargetCommand bool
 
 	// Use Hook only for the `terraform init` command, which can be run explicitly by the user or Terragrunt's `auto-init` feature.
 	switch {
@@ -162,6 +159,8 @@ func (cache *ProviderCache) TerraformCommandHook(
 		return tf.RunCommandWithOutput(ctx, opts, args...)
 	}
 
+	env := providerCacheEnvironment(opts, cliConfigFilename)
+
 	if output, err := cache.warmUpCache(ctx, opts, cliConfigFilename, args, env); err != nil {
 		return output, err
 	}


Test patch: