Oi,
Recebo um problema ao tentar usar o tfenv no MacOS:
Instalação:
$ brew install tfenv
==> Downloading https://github.com/kamatama41/tfenv/archive/v0.6.0.tar.gz
Already downloaded: /Users/*******/Library/Caches/Homebrew/tfenv-0.6.0.tar.gz
🍺 /usr/local/Cellar/tfenv/0.6.0: 19 files, 23.5KB, built in 1 second
$
Lista remota:
$ tfenv list-remote
0.11.2
0.11.1
0.11.0
0.11.0-rc1
0.11.0-beta1
...
0.1.1
0.1.0
Tente instalar uma versão:
$ tfenv install latest
[INFO] Installing Terraform v0.11.2
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_darwin_amd64.zip
curl: (3) [globbing] bad range in column 44
tfenv: tfenv-install: [ERROR] Tarball download failed
$ tfenv install 0.11.2
tfenv: tfenv-install: [ERROR] No versions matching '0.11.2' found in remote
$ tfenv install 0.11.1
tfenv: tfenv-install: [ERROR] No versions matching '0.11.1' found in remote
tfenv install latest
[INFO] Installing Terraform v0.11.2
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_darwin_amd64.zip
curl: (3) [globbing] bad range in column 44
tfenv: tfenv-install: [ERROR] Tarball download failed
Detalhes do Mac OS:
$ echo $BASH_VERSION
4.4.12(1)-release
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.13.2 (17C205)
Kernel Version: Darwin 17.3.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: **********
User Name: **********
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 5 days 3:44
$ curl --version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy
Alguma idéia de por que isso acontece?
Atualização: parece que a causa raiz foi que no meu perfil bash estou usando a opção de cor grep:
# For grep
export GREP_OPTIONS='--color=always'
que instrui o grep a imprimir também caracteres de cores interpretados especiais e, portanto, o script falha.
Solução alternativa: use --color=never em scripts bash para que ele sobrescreva a configuração do ambiente bash do usuário para grep. RP nº 84.
Obrigada. Usando isso por enquanto.
GREP_OPTIONS="--color=never" tfenv install 0.11.7
ou um alias no meu arquivo rc
alias tfenv='GREP_OPTIONS="--color=never" tfenv'
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Começando a pensar que isso não é mais preocupação do tfscaffold.
Eu tenho o mesmo problema - tfenv 1.0.1:
tfenv list-remote
<empty>
Usando as soluções fornecidas acima, não funcionou.
Qualquer melhor com 2.0.0-alpha3?
Por favor, reabra se os problemas persistirem com a v2.0.0
Encontrei esse problema hoje na versão 2.0.0 desculpe ... :-/ O alias já corrigiu meu problema.
Comentários muito úteis
Eu tenho o mesmo problema - tfenv 1.0.1:
tfenv list-remote
<empty>
Usando as soluções fornecidas acima, não funcionou.