Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Print warning when rakefile appears to be broken #57

Closed
wants to merge 1 commit into from

2 participants

vfilesgroup Richard Schneeman
vfilesgroup

Related to #34, but a little simpler and naive.

It will print a warning if the dry-run fails, but the error doesn't incude the Don't know how to build task '...' message. Otherwise the behavior is as you would expect.

Richard Schneeman
Owner

we had some major errors merging in #34 :( this won't cleanly merge anymore. This won't be merged in.

Richard Schneeman schneems closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 31, 2012
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/language_pack/ruby.rb
8 lib/language_pack/ruby.rb
View
@@ -546,7 +546,13 @@ def lockfile_parser
# @param [String] the task in question
# @return [Boolean] true if the rake task is defined in the app
def rake_task_defined?(task)
- run("env PATH=$PATH bundle exec rake #{task} --dry-run") && $?.success?
+ output = run("env PATH=$PATH bundle exec rake #{task} --dry-run")
+ if output && $?.success?
+ return true
+ elsif !output.match(/Don't know how to build task '#{task}'/)
+ puts "WARNING: There appears to have been an issue loading your rake file, you might like to check it out"
+ end
+ false
end
# executes the block with GIT_DIR environment variable removed since it can mess with the current working directory git thinks it's in
Something went wrong with that request. Please try again.