lib/danger/commands/local.rb in danger-0.8.2 vs lib/danger/commands/local.rb in danger-0.8.3
- old
+ new
@@ -25,37 +25,37 @@
def run
ENV["DANGER_USE_LOCAL_GIT"] = "YES"
ENV["LOCAL_GIT_PR_ID"] = @pr_num if @pr_num
env = EnvironmentManager.new(ENV)
- dm = Dangerfile.new(env)
+ dm = Dangerfile.new(env, cork)
dm.init_plugins
source = dm.env.ci_source
if source.nil? or source.repo_slug.empty?
- puts "danger local failed because it only works with GitHub projects at the moment. Sorry.".red
+ cork.puts "danger local failed because it only works with GitHub projects at the moment. Sorry.".red
exit 0
end
gh = dm.env.request_source
- puts "Running your Dangerfile against this PR - https://#{gh.github_host}/#{source.repo_slug}/pull/#{source.pull_request_id}"
+ cork.puts "Running your Dangerfile against this PR - https://#{gh.host}/#{source.repo_slug}/pull/#{source.pull_request_id}"
if verbose != true
- puts "Turning on --verbose"
+ cork.puts "Turning on --verbose"
dm.verbose = true
end
- puts ""
+ cork.puts
# We can use tokenless here, as it's running on someone's computer
# and is IP locked, as opposed to on the CI.
gh.support_tokenless_auth = true
begin
gh.fetch_details
rescue Octokit::NotFound
- puts "Local repository was not found on GitHub. If you're trying to test a private repository please provide a valid API token through " + "DANGER_GITHUB_API_TOKEN".yellow + " environment variable."
+ cork.puts "Local repository was not found on GitHub. If you're trying to test a private repository please provide a valid API token through " + "DANGER_GITHUB_API_TOKEN".yellow + " environment variable."
return
end
dm.env.request_source = gh