Skip to content

Commit

Permalink
Fix anyenv path.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekolaboratory committed Aug 30, 2023
1 parent 51ad05b commit 574794a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions recipes/anyenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 574794a

Please sign in to comment.