From 202a0c458fa58c85b59ce810a08e2c0dc877d98d Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Thu, 29 Oct 2015 15:24:59 -0400 Subject: [PATCH] PR #34 - fix R10k exception passing to ErrorWrapper for r10k 1.5.1 --- lib/vagrant-r10k/action/deploy.rb | 2 +- lib/vagrant-r10k/action/validate.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-r10k/action/deploy.rb b/lib/vagrant-r10k/action/deploy.rb index 0e1a29a..b83ceca 100644 --- a/lib/vagrant-r10k/action/deploy.rb +++ b/lib/vagrant-r10k/action/deploy.rb @@ -69,7 +69,7 @@ def deploy(env, config) @logger.debug("vagrant-r10k: sync task complete") rescue Exception => ex @env[:ui].error "Invalid syntax in Puppetfile at #{config[:puppetfile_path]}" - raise ErrorWrapper.new(ex) + raise ErrorWrapper.new(ex.original) end unless runner.succeeded? runner.get_errors().each do |error| diff --git a/lib/vagrant-r10k/action/validate.rb b/lib/vagrant-r10k/action/validate.rb index 47fa945..23fd102 100644 --- a/lib/vagrant-r10k/action/validate.rb +++ b/lib/vagrant-r10k/action/validate.rb @@ -34,7 +34,7 @@ def call(env) puppetfile.load rescue Exception => ex @env[:ui].error "Invalid syntax in Puppetfile at #{config[:puppetfile_path]}" - raise ErrorWrapper.new(ex) + raise ErrorWrapper.new(ex.original) end @app.call(env)