yleisradio / chtf Goto Github PK
View Code? Open in Web Editor NEWTerraform version switcher with automatic install
License: MIT License
Terraform version switcher with automatic install
License: MIT License
tfenv supports strings like latest:^1.
in order to grab the most recent version that matches a regex constraint. This is useful for keeping within a particular major or minor version, while continuing to get patch and security updates without needing to manually change your .terraform-version
every time.
I'd love to see chtf support this syntax as well, if only to maintain compatibility with existing .terraform-version
files
Its probably my environment, as I have not done this for a while, but I am unable to use chtf
to install new terrarform versions
$ chtf 0.14.7
chtf: Installing Terraform version 0.14.7
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 2 formulae.
==> Updated Casks
Updated 1 cask.
Error: Unknown command: cask
I can however install the version myself, which resolves it for me
brew install [--cask] terraform-0.14.7
My environment:
I get the error "Error: Installing casks is supported only on macOS" when executing chtf 1.1.6 whether in a zsh or bash shell on Linux Mint 20.3 Cinnamon
โ ~ brew --version
Homebrew 3.4.3
Homebrew/homebrew-core (git revision 93ad38a33b3; last commit 2022-03-22)
chtf 0.14.11
chtf: Terraform version 0.14.11 not found
chtf: Do you want to install it? [yN] y
chtf: Installing Terraform version 0.14.11
Error: Download failed on Cask 'terraform-0.14.11' with message: undefined method `using' for nil:NilClass
brew upgrade chtf
Warning: yleisradio/terraforms/chtf 2.1.1 already installed
โฏ chtf 1.0.7
chtf: Terraform version 1.0.7 not found
chtf: Do you want to install it? [yN] y
chtf: Installing Terraform version 1.0.7
==> Downloading https://releases.hashicorp.com/terraform/1.0.7/terraform_1.0.7_darwin_arm64.zip
######################################################################## 100.0%
==> Installing Cask terraform-1.0.7
๐บ terraform-1.0.7 was successfully installed!
OSX Monterey 12.1
Apple Silicon
The Homebrew Tap should already be ready (Yleisradio/homebrew-terraforms#82), but also the bundled auto-installer should be modified.
Depends on robertpeteuil/terraform-installer#8.
chtf.sh sourcing hangs on this line for quite a while:
+/usr/local/share/chtf/chtf.sh:32> grep -q '^yleisradio/terraforms$'
Time without chtf:
time zsh -i -c exit
zsh -i -c exit 0.04s user 0.03s system 86% cpu 0.073 total
and time with chtf:
time zsh -i -c exit
zsh -i -c exit 0.62s user 0.39s system 93% cpu 1.078 total
This is my zsh zprof with chtf sourcing enabled:
num calls time self name
-----------------------------------------------------------------------------------
1) 1 24.43 24.43 82.70% 24.43 24.43 82.70% compinit
2) 2 3.67 1.84 12.44% 3.67 1.84 12.44% promptinit
3) 6 0.63 0.10 2.13% 0.63 0.10 2.13% add-zsh-hook
4) 1 0.35 0.35 1.18% 0.35 0.35 1.18% select-word-style
5) 1 0.94 0.94 3.19% 0.17 0.17 0.59% set_prompt
6) 1 1.09 1.09 3.68% 0.15 0.15 0.50% prompt
7) 2 0.14 0.07 0.47% 0.14 0.07 0.47% prompt_suse_setup
-----------------------------------------------------------------------------------
1) 1 24.43 24.43 82.70% 24.43 24.43 82.70% compinit
-----------------------------------------------------------------------------------
1/2 3.05 3.05 10.32% 3.05 3.05 promptinit [2]
2) 2 3.67 1.84 12.44% 3.67 1.84 12.44% promptinit
1/2 3.05 3.05 10.32% 3.05 3.05 promptinit [2]
-----------------------------------------------------------------------------------
6) 1 1.09 1.09 3.68% 0.15 0.15 0.50% prompt
1/1 0.94 0.94 3.19% 0.17 0.17 set_prompt [5]
-----------------------------------------------------------------------------------
1/1 0.94 0.94 3.19% 0.17 0.17 prompt [6]
5) 1 0.94 0.94 3.19% 0.17 0.17 0.59% set_prompt
1/2 0.14 0.14 0.47% 0.13 0.13 prompt_suse_setup [7]
6/6 0.63 0.10 2.13% 0.63 0.10 add-zsh-hook [3]
-----------------------------------------------------------------------------------
6/6 0.63 0.10 2.13% 0.63 0.10 set_prompt [5]
3) 6 0.63 0.10 2.13% 0.63 0.10 2.13% add-zsh-hook
-----------------------------------------------------------------------------------
4) 1 0.35 0.35 1.18% 0.35 0.35 1.18% select-word-style
-----------------------------------------------------------------------------------
1/2 0.14 0.14 0.47% 0.13 0.13 set_prompt [5]
1/2 0.01 0.01 0.03% 0.01 0.01 prompt_suse_setup [7]
7) 2 0.14 0.07 0.47% 0.14 0.07 0.47% prompt_suse_setup
1/2 0.01 0.01 0.03% 0.01 0.01 prompt_suse_setup [7]
Without:
num calls time self name
-----------------------------------------------------------------------------------
1) 1 25.77 25.77 81.32% 25.77 25.77 81.32% compinit
2) 2 3.76 1.88 11.87% 3.76 1.88 11.87% promptinit
3) 6 0.89 0.15 2.82% 0.89 0.15 2.82% add-zsh-hook
4) 1 0.55 0.55 1.74% 0.55 0.55 1.74% select-word-style
5) 1 1.44 1.44 4.55% 0.33 0.33 1.05% set_prompt
6) 2 0.22 0.11 0.68% 0.22 0.11 0.68% prompt_suse_setup
7) 1 1.61 1.61 5.07% 0.16 0.16 0.51% prompt
-----------------------------------------------------------------------------------
1) 1 25.77 25.77 81.32% 25.77 25.77 81.32% compinit
-----------------------------------------------------------------------------------
1/2 3.15 3.15 9.94% 3.15 3.15 promptinit [2]
2) 2 3.76 1.88 11.87% 3.76 1.88 11.87% promptinit
1/2 3.15 3.15 9.94% 3.15 3.15 promptinit [2]
-----------------------------------------------------------------------------------
7) 1 1.61 1.61 5.07% 0.16 0.16 0.51% prompt
1/1 1.44 1.44 4.55% 0.33 0.33 set_prompt [5]
-----------------------------------------------------------------------------------
1/1 1.44 1.44 4.55% 0.33 0.33 prompt [7]
5) 1 1.44 1.44 4.55% 0.33 0.33 1.05% set_prompt
1/2 0.22 0.22 0.68% 0.21 0.21 prompt_suse_setup [6]
6/6 0.89 0.15 2.82% 0.89 0.15 add-zsh-hook [3]
-----------------------------------------------------------------------------------
6/6 0.89 0.15 2.82% 0.89 0.15 set_prompt [5]
3) 6 0.89 0.15 2.82% 0.89 0.15 2.82% add-zsh-hook
-----------------------------------------------------------------------------------
4) 1 0.55 0.55 1.74% 0.55 0.55 1.74% select-word-style
-----------------------------------------------------------------------------------
1/2 0.22 0.22 0.68% 0.21 0.21 set_prompt [5]
1/2 0.01 0.01 0.03% 0.01 0.01 prompt_suse_setup [6]
6) 2 0.22 0.11 0.68% 0.22 0.11 0.68% prompt_suse_setup
1/2 0.01 0.01 0.03% 0.01 0.01 prompt_suse_setup [6]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.