Closed minamijoyo closed 1 year ago
Fixes #96
When the filename is intentionally specified, we should not ignore it by its extension as much as possible.
$ cat tmp/test.hcl terraform { required_version = "1.5.0" required_providers { aws = { source = "hashicorp/aws" version = "5.3.0" } } } $ go run main.go terraform -v 1.5.2 tmp/test.hcl $ cat tmp/test.hcl terraform { required_version = "1.5.2" required_providers { aws = { source = "hashicorp/aws" version = "5.3.0" } } } $ go run main.go provider aws -v 5.7.0 tmp/test.hcl $ cat tmp/test.hcl terraform { required_version = "1.5.2" required_providers { aws = { source = "hashicorp/aws" version = "5.7.0" } } }
Fixes #96
When the filename is intentionally specified, we should not ignore it by its extension as much as possible.