install Hashicorp/google-beta: FATA[0013] Bash execution did not run successfully: exit status 2
PaulAtFlexa opened this issue · comments
Expected Behavior
Provider installs correctly and works on m1
Actual Behavior
paultudan@Pauls-MacBook-Pro cluster % m1-terraform-provider-helper install hashicorp/google-beta -v v2.20.2
Getting provider data from terraform registry
Getting source code...
Compiling...
FATA[0013] Bash execution did not run successfully: exit status 2.
Output:
make: *** [fmtcheck] Error 1
Steps to Reproduce (including precondition)
Using m1-terraform-provider-helper 0.8.0
run the install step
m1-terraform-provider-helper install hashicorp/google-beta -v v2.20.2
see error
I successfully have installed hashicorp/archive -v v1.3.0
hashicorp/tls -v v2.2.0
and hashicorp/local -v v1.4.0
so the issue is unlikely to be related to my m1-terraform-provider-helper setup.
Your Environment
- OS: macOS 12.6
- m1-terraform-provider-helper version: 0.8.0
The default make build
apparently does not work for this provider. As a workaround please use gofmt -s -w ./tools.go && make build
and pass it as a custom build command
That worked on my local machine.
Hey Junkern,
Appreciate the response and this tool. It's very helpful.
Unfortunately that command doesn't seem to work for me, I still get the same errors. I tried both the command you suggested (my gofmt is installed with brew FWIW) and also replacing the gofmt part with make fmt
.
https://github.com/hashicorp/terraform-provider-google-beta/blob/main/GNUmakefile
https://github.com/hashicorp/terraform-provider-google-beta/blob/main/scripts/gofmtcheck.sh
HOWEVER, I eventually got it to work with the following:
m1-terraform-provider-helper install hashicorp/google-beta -v v2.20.2 --custom-build-command 'gofmt -s -l -w . && make build'
There are other .go files in that repo and I guess somehow they managed to commit them without the files passing their own formatter... how I will never know
HOWEVER, I eventually got it to work with the following:
m1-terraform-provider-helper install hashicorp/google-beta -v v2.20.2 --custom-build-command 'gofmt -s -l -w . && make build'
There are other .go files in that repo and I guess somehow they managed to commit them without the files passing their own formatter... how I will never know
This worked for me to install hashicorp/kubernetes.