Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: brew cask info dropbox #25611

Closed
miccal opened this issue Oct 18, 2016 · 15 comments
Closed

Bug report: brew cask info dropbox #25611

miccal opened this issue Oct 18, 2016 · 15 comments

Comments

@miccal
Copy link
Member

miccal commented Oct 18, 2016

Description of issue

Within the last 24 hours, running the brew cask info dropbox command reports that Error: File '/Users/$USER/dropbox' is not a plain file.

I have checked this on two machines, and they both are reporting this.

Output of brew cask <command> --verbose

-bash-4.4.0- /Users/$USER [> brew cask info dropbox --verbose
Error: File '/Users/$USER/dropbox' is not a plain file
Error: Kernel.exit

Output of brew doctor

-bash-4.4.0- /Users/$USER [> brew doctor
Your system is ready to brew.

Output of brew cask doctor

-bash-4.4.0- /Users/$USER [> brew cask doctor
==> macOS Release:
10.12
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 1.0.8
Homebrew/homebrew-core (git revision 4b1c4; last commit 2016-10-17)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local/Homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew
==> Homebrew-Cask Version:
Homebrew-Cask 1.0.8
caskroom/homebrew-cask (git revision 9c4ba; last commit 2016-10-18)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/$USER/Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
==> Homebrew-Cask Default Tap Cask Count:
3394
==> Contents of $LOAD_PATH:
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin16
/Library/Ruby/Site/2.0.0/universal-darwin16
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd:/usr/local/Homebrew/Library/Homebrew/cask/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/usr/local/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_AU.UTF-8"
==> Running As Privileged User:
No
@jawshooah
Copy link
Contributor

Can you show me the output of brew cask info dropbox --debug?

@miccal
Copy link
Member Author

miccal commented Oct 18, 2016

As requested:

-bash-4.4.0- /Users/$USER [> brew cask info dropbox --debug
==> Getting info for Cask dropbox
==> Loading Cask definitions
==> Translating 'dropbox' into a valid Cask source
==> Testing source class Hbc::Source::URI
==> Testing source class Hbc::Source::PathSlashRequired
==> Testing source class Hbc::Source::TappedQualified
==> Testing source class Hbc::Source::UntappedQualified
==> Testing source class Hbc::Source::Tapped
==> Success! Using source class Hbc::Source::Tapped
==> Resolved Cask URI or file source to '/Users/$USER/dropbox'
Error: File '/Users/$USER/dropbox' is not a plain file/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:6:in `load_from_file'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:20:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/tapped.rb:15:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc.rb:57:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/info.rb:9:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/info.rb:7:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/info.rb:7:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:109:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:148:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:153:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:153:in `rescue in process'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:143:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

@jawshooah jawshooah added bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. labels Oct 18, 2016
@jawshooah
Copy link
Contributor

I can reproduce. When there is a file named dropbox (or whatever the name of the Cask is) in the current working directory, Hbc.path attempts to read it in as the Cask file. In this particular case, I was able to reproduce by creating a dropbox symlink in my CWD. Thanks for the bug report!

@miccal
Copy link
Member Author

miccal commented Oct 18, 2016

You're welcome. I run brew cu to update my casks regularly (a tap of buo/cask-upgrade) and running it today showed this error. I am not sure what changed in the last 24 hours?

You are correct though - I created a folder called Ipe in my CWD, and running brew cask info ipe then reported the same error.

@jawshooah
Copy link
Contributor

Opened a PR with the fix: Homebrew/brew#1315

@miccal
Copy link
Member Author

miccal commented Oct 18, 2016

Thanks @jawshooah.

@jawshooah
Copy link
Contributor

Closed in favor of Homebrew/brew#1315.

@miccal
Copy link
Member Author

miccal commented Oct 20, 2016

Hello @jawshooah, I noticed that Homebrew/brew#1315 has been merged, but the problem is still persisting.

@adidalal
Copy link
Contributor

@miccal I think a new brew release needs to be cut (tagged) for the changes to actually be pushed out.

@miccal
Copy link
Member Author

miccal commented Oct 20, 2016

Ah, I forgot about that, thanks @adidalal.

@jawshooah
Copy link
Contributor

@miccal If you don't want to wait, you could just manually cd "$(brew --repository)" && git fetch origin master:master && git checkout master

@miccal
Copy link
Member Author

miccal commented Oct 20, 2016

Thanks @jawshooah.

@RJHsiao
Copy link
Contributor

RJHsiao commented Oct 21, 2016

Just notice that: not only dropbox, but also megasync had same issue.

@jawshooah
Copy link
Contributor

@RJHsiao Yes, as would any cask that happens to share a name with a file in current working directory 😉

@RJHsiao
Copy link
Contributor

RJHsiao commented Oct 21, 2016

Yeah, your right 👍

@miccal miccal removed bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. labels Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants