andsens / homeshick

git dotfiles synchronizer written in bash
MIT License
2.11k stars 145 forks source link

Dependancy Issue with ASDF #186

Closed peterlobster closed 5 years ago

peterlobster commented 5 years ago

There's a dependency issue with ASDF. I overwrote the files and both Homeshick and ASDF seem to work fine. However, maybe something to look into? Maybe should also be reported to ASDF?

brew install homeshick
==> Installing homeshick                                                                                                                           
==> Downloading https://github.com/andsens/homeshick/archive/v1.1.0.tar.gz                                                                                                                                                                                                                     
Error: The `brew link` step did not complete successfully                                                                                            
The formula built, but is not symlinked into /usr/local                                                                                              
Could not symlink lib/commands/help.sh                                                                                                               
Target /usr/local/lib/commands/help.sh                                                                                                               
is a symlink belonging to asdf. You can unlink it:                                                                                                   
  brew unlink asdf                                                                                                                                   

To force the link and overwrite all conflicting files:                                                                                               
  brew link --overwrite homeshick                                                                                                                    

To list all files that would be deleted:                                                                                                             
  brew link --overwrite --dry-run homeshick                                                                                                          

Possible conflicting files are:                                                                                                                      
/usr/local/lib/commands/help.sh -> /usr/local/Cellar/asdf/0.6.2/lib/commands/help.sh                                                                 
/usr/local/lib/commands/list.sh -> /usr/local/Cellar/asdf/0.6.2/lib/commands/list.sh                                                                 
==> Caveats                                                                                                                                          
To enable the `homeshick cd <CASTLE>` command, you need to                                                                                           
  `export HOMESHICK_DIR=/usr/local/opt/homeshick`                                                                                                    
and                                                                                                                                                  
  `source "/usr/local/opt/homeshick/homeshick.sh"`                                                                                                   
in your $HOME/.bashrc                                                                                                                                

Bash completion has been installed to:                                                                                                               
  /usr/local/etc/bash_completion.d                                                                                                                   

zsh completions have been installed to:                                                                                                              
  /usr/local/share/zsh/site-functions                                                                                                                

fish functions have been installed to:                                                                                                               
  /usr/local/share/fish/vendor_functions.d                                                                                                           
==> Summary                                                                                                                                          
🍺  /usr/local/Cellar/homeshick/1.1.0: 24 files, 54.4KB, built in 2 seconds                                                                          
peterlobster commented 5 years ago

Also reported to Homebrew https://github.com/Homebrew/homebrew-core/issues/35588

apjanke commented 5 years ago

"commands" is a pretty generic directory name to drop directly in lib. Maybe it could be moved to lib/homeshick/commands/ to avoid conflicts?

andsens commented 5 years ago

I'm closing this one. This is definitely a problem with the way the homebrew formula installs homeshick. There's no reason for any of the homeshick functions to be available directly in lib. HOMESHICK_DIR should not be "just" #{opt_prefix}.

apjanke commented 5 years ago

Okay. That means the Homebrew formula needs to be modified, probably to stick everything in libexec like it does with Java packages. I'll take it up with Homebrew if I find time.

peterlobster commented 5 years ago

@apjanke thank you for taking care of this!