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

Make the Bundler warning less scary and more friendly #275

Merged
merged 1 commit into from Apr 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/guard/cli.rb
Expand Up @@ -159,7 +159,14 @@ def show
#
def verify_bundler_presence
if File.exists?('Gemfile') && !ENV['BUNDLE_GEMFILE']
::Guard::UI.warning 'You are using Guard outside of Bundler, this is dangerous and may not work. Using `bundle exec guard` is safer.'
::Guard::UI.info <<EOT

Guard here! It looks like your project has a Gemfile, yet you are running
`guard` outside of Bundler. If this is your intent, feel free to ignore this
message. Otherwise, consider using `bundle exec guard` to ensure your
dependencies are loaded correctly.
(You can run `guard` with --no-bundler-warning to get rid of this message.)
EOT
end
end

Expand Down