diff --git a/lib/pact/configuration.rb b/lib/pact/configuration.rb index 952a475..446d292 100644 --- a/lib/pact/configuration.rb +++ b/lib/pact/configuration.rb @@ -169,6 +169,11 @@ def create_logger logger = ::Logger.new(log_path) logger.level = ::Logger::DEBUG logger + rescue Errno::EROFS + # So we can run on RunKit + logger = ::Logger.new($stdout) + logger.level = ::Logger::DEBUG + logger end end diff --git a/lib/pact/consumer_contract/pact_file.rb b/lib/pact/consumer_contract/pact_file.rb index 174f332..4288d0d 100644 --- a/lib/pact/consumer_contract/pact_file.rb +++ b/lib/pact/consumer_contract/pact_file.rb @@ -33,6 +33,8 @@ def read uri, options = {} def save_pactfile_to_tmp pact, name ::FileUtils.mkdir_p Pact.configuration.tmp_dir ::File.open(Pact.configuration.tmp_dir + "/#{name}", "w") { |file| file << pact} + rescue Errno::EROFS => e + # do nothing, probably on RunKit end def render_pact(uri_string, options)