Skip to content

Commit

Permalink
Update asdf.rb
Browse files Browse the repository at this point in the history
Switch to `opt_libexec` which translates to `opt_prefix/"libexec`, this means that there will be no migration steps for shims. 
However till adding a `$ asdf reshim` `post_install` hook incase there is an update that needs to be done on the shims when `asdf` itself updates to a new version or formula revision. There are changes pending on  [`asdf-vm`](asdf-vm/asdf#893) that would allow regenerating the shims in case they need to be.
  • Loading branch information
seivan committed Mar 15, 2021
1 parent 731290a commit 5b99c71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Formula/asdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ def install
bash_completion.install "completions/asdf.bash"
fish_completion.install "completions/asdf.fish"
zsh_completion.install "completions/_asdf"
libexec.install Dir["*"]
bin.write_exec_script (libexec/"bin/asdf")
bin.write_exec_script (opt_libexec/"bin/asdf")
prefix.install_metafiles
end

def post_install
system bin/"asdf", "reshim"
end

test do
Expand Down

0 comments on commit 5b99c71

Please sign in to comment.