diff --git a/recipes/anyenv.rb b/recipes/anyenv.rb index 09a82cb..531904f 100644 --- a/recipes/anyenv.rb +++ b/recipes/anyenv.rb @@ -6,6 +6,8 @@ to "#{ENV['HOME']}/.dotfiles/conf/zshrc.d/anyenv.zsh" end +run_command("exec #{ENV['SHELL']} -l", error: false) + execute "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; anyenv install --force-init'" do not_if "test -d #{ENV['HOME']}/.config/anyenv/anyenv-install" end @@ -18,18 +20,18 @@ not_if "test -d #{ENV['HOME']}/.anyenv/envs/rbenv/plugins/ruby-build" end -execute "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; rbenv install 3.2.2; rbenv global 3.2.2'" do +execute "rbenv install 3.2.2; rbenv global 3.2.2" do not_if "test -d #{ENV['HOME']}/.anyenv/envs/rbenv/versions/3.2.2" end -execute "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; anyenv install pyenv'" do +execute "anyenv install pyenv" do not_if "test -d #{ENV['HOME']}/.anyenv/envs/pyenv" end -execute "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; pyenv install 3.9.12; pyenv global 3.9.12'" do +execute "exec #{ENV['SHELL']} -l; pyenv install 3.9.12; pyenv global 3.9.12" do not_if "test -d #{ENV['HOME']}/.anyenv/envs/pyenv/versions/3.9.12" end -execute "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; pip install powerline-status'" do - not_if "/bin/zsh -lc 'source #{ENV['HOME']}/.zshrc; pip list | grep powerline-status'" +execute "exec #{ENV['SHELL']} -l; pip install powerline-status" do + not_if "exec #{ENV['SHELL']} -l; pip list | grep powerline-status" end