Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.87k stars 10.69k forks source link

Linking not working since 0.18.0 #1168

Closed exiva closed 11 years ago

exiva commented 11 years ago

Links are not created since 0.18.0, same behavior in 0.18.2. It says in the log it's creating the link

==> Linking Viber.app to /Users/travis/Applications/Viber.app

but the link isn't made, also the link/unlink commands are removed from cask.

phinze commented 11 years ago

weird... looking into this now...

phinze commented 11 years ago

Hmm so everything seems to be working for me... I can brew cask install viber and afterwards I see the link just fine:

$ brew cask install viber
==> Downloading http://download.viber.com/desktop/mac/Viber.dmg
==> Linking Viber.app to /Users/phinze/Applications/Viber.app
==> Success! viber installed to /opt/homebrew-cask/Caskroom/viber/latest
$ ls -l ~/Applications/Viber.app
lrwxr-xr-x  1 phinze  staff  50 Oct  7 22:14 /Users/phinze/Applications/Viber.app -> /opt/homebrew-cask/Caskroom/viber/latest/Viber.app

What does the output of ls -l ~/Applications show for you after installing viber?

exiva commented 11 years ago

travis at traviss-mbp in ~ $ export HOMEBREW_CASK_OPTS="--appdir=~/Applications" travis at traviss-mbp in ~ $ brew cask install viber ==> Downloading http://download.viber.com/desktop/mac/Viber.dmg Already downloaded: /Library/Caches/Homebrew/viber-latest.dmg ==> Linking Viber.app to /Users/travis/Applications/Viber.app ==> Success! viber installed to /opt/homebrew-cask/Caskroom/viber/latest travis at traviss-mbp in ~ $ ls -l ~/Applications/ total 84 lrwxr-xr-x 1 travis staff 49 Oct 7 19:51 Adium.app -> /opt/homebrew-cask/Caskroom/adium/1.5.7/Adium.app lrwxr-xr-x 1 travis staff 57 Oct 7 19:51 Alfred 2.app -> /opt/homebrew-cask/Caskroom/alfred/2.0.9_214/Alfred 2.app lrwxr-xr-x 1 travis staff 101 Oct 7 19:51 Alfred Preferences.app -> /opt/homebrew-cask/Caskroom/alfred/2.0.9_214/Alfred 2.app/Contents/Preferences/Alfred Preferences.app lrwxr-xr-x 1 travis staff 53 Oct 7 19:51 Arduino.app -> /opt/homebrew-cask/Caskroom/arduino/1.0.5/Arduino.app lrwxr-xr-x 1 travis staff 52 Oct 7 19:51 Cloud.app -> /opt/homebrew-cask/Caskroom/cloudapp/1.5.6/Cloud.app lrwxr-xr-x 1 travis staff 49 Oct 7 19:51 Flux.app -> /opt/homebrew-cask/Caskroom/f-lux/latest/Flux.app lrwxr-xr-x 1 travis staff 52 Oct 7 19:51 GitHub.app -> /opt/homebrew-cask/Caskroom/github/latest/GitHub.app lrwxr-xr-x 1 travis staff 55 Oct 7 19:51 LimeChat.app -> /opt/homebrew-cask/Caskroom/lime-chat/2.37/LimeChat.app lrwxr-xr-x 1 travis staff 46 Oct 7 19:51 Mou.app -> /opt/homebrew-cask/Caskroom/mou/latest/Mou.app lrwxr-xr-x 1 travis staff 56 Oct 7 19:51 Opera.app -> /opt/homebrew-cask/Caskroom/opera/16.0.1196.73/Opera.app lrwxr-xr-x 1 travis staff 59 Oct 7 19:51 Processing.app -> /opt/homebrew-cask/Caskroom/processing/2.0.2/Processing.app lrwxr-xr-x 1 travis staff 59 Oct 7 19:51 Sequel Pro.app -> /opt/homebrew-cask/Caskroom/sequel-pro/1.0.2/Sequel Pro.app lrwxr-xr-x 1 travis staff 58 Oct 7 19:51 Spotifree.app -> /opt/homebrew-cask/Caskroom/spotifree/latest/Spotifree.app lrwxr-xr-x 1 travis staff 54 Oct 7 19:51 Spotify.app -> /opt/homebrew-cask/Caskroom/spotify/stable/Spotify.app lrwxr-xr-x 1 travis staff 50 Oct 7 19:51 Steam.app -> /opt/homebrew-cask/Caskroom/steam/stable/Steam.app lrwxr-xr-x 1 travis staff 65 Oct 7 19:51 Sublime Text 2.app -> /opt/homebrew-cask/Caskroom/sublime-text/2.0.2/Sublime Text 2.app lrwxr-xr-x 1 travis staff 56 Oct 7 19:59 Swinsian.app -> /opt/homebrew-cask/Caskroom/swinsian/latest/Swinsian.app lrwxr-xr-x 1 travis staff 62 Oct 7 19:51 Transmission.app -> /opt/homebrew-cask/Caskroom/transmission/2.82/Transmission.app lrwxr-xr-x 1 travis staff 46 Oct 7 19:51 Vox.app -> /opt/homebrew-cask/Caskroom/vox/latest/Vox.app lrwxr-xr-x 1 travis staff 50 Oct 7 19:51 XLD.app -> /opt/homebrew-cask/Caskroom/xld/2013-07-20/XLD.app lrwxr-xr-x 1 travis staff 50 Oct 7 19:51 iTerm.app -> /opt/homebrew-cask/Caskroom/iterm2/1.0.0/iTerm.app travis at traviss-mbp in ~ $

Was working fine before I did a brew update & upgrade.

phinze commented 11 years ago

Thanks for the additional info - FYI you're exporting the default value for --appdir so you can remove HOMEBREW_CASK_OPTS from your env with no effects. I be the env variable is probably what's broken. Looking into that now.

exiva commented 11 years ago

I should have mentioned, but forgot... This is on the GM of 10.9.

phinze commented 11 years ago

Oooo maybe that has something to do with it (the env variable stuff all seems to be working fine from here)...

Does this command work okay manually for you after installing?

 ln -vhfs /opt/homebrew-cask/Caskroom/viber/latest/Viber.app ~/Applications/Viber.app
exiva commented 11 years ago

$ ln -vhfs /opt/homebrew-cask/Caskroom/viber/latest/Viber.app ~/Applications/Viber.app ln: invalid option -- 'h' Try 'ln --help' for more information.

Ok, wait. It seems a conflict with homebrew's coreutils package, and ln that ships with OSX. using the shipping ln works fine. coreutils causes the error.

phinze commented 11 years ago

ta daaaaa! thanks 10.9 for changing the ln interface on us. :finnadie:

can probably just remove the extra option; let me look into it. though it's odd that you only just started seeing this... after the refactor... i coulda sworn we used that option before.

sorry for the trouble - hopefully i can get this tied up quickly here :bowtie:

phinze commented 11 years ago

oh wait i didn't fully read your message - are you saying you had done brew install coreutils and put gnubin in your path? that will definitely make for sadness.

let me know if that's the issue here and we can slowly back away - though i do have some cleanup work to do around failing commands. it shouldn't have just silently failed like that.

exiva commented 11 years ago

Yea, it's something with coreutils' ln command. Removed and works again.

phinze commented 11 years ago

hooray! gonna close this then - feel free to reopen if you have more sadness. thanks for keeping up the good communication - helps so much for debugging. :bug: