你好,
尝试在 MacOS 上使用 tfenv 时遇到问题:
安装:
$ 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
$
远程列表:
$ 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
尝试安装一个版本:
$ 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
macOS 详细信息:
$ 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
知道为什么会这样吗?
更新:看起来根本原因是在我的 bash 配置文件中我使用了 grep 颜色选项:
# For grep
export GREP_OPTIONS='--color=always'
它指示 grep 还打印特殊的解释颜色字符,因此脚本失败。
解决方法:在 bash 脚本中使用 --color=never 以覆盖用户的 grep bash 环境配置。 公关#84。
谢谢你。 暂时使用这个。
GREP_OPTIONS="--color=never" tfenv install 0.11.7
或我的 rc 文件中的别名
alias tfenv='GREP_OPTIONS="--color=never" tfenv'
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
开始认为这不再是 tfscaffold 关心的问题。
我有同样的问题 - tfenv 1.0.1:
tfenv list-remote
<empty>
使用上面提供的解决方案,不起作用。
2.0.0-alpha3 更好吗?
如果 v2.0.0 仍然存在问题,请重新打开
我今天在 2.0.0 版上遇到了这个问题,对不起... :-/ 别名如何解决了我的问题。
最有用的评论
我有同样的问题 - tfenv 1.0.1:
tfenv list-remote
<empty>
使用上面提供的解决方案,不起作用。