Skip to content

Commit

Permalink
Fail When Unable to Cache Files
Browse files Browse the repository at this point in the history
Previously, when a file could not be cached during offline packaging, a
warning was printed, but the packaging continued without a necessary file.
This is by design for an older requirement that would allow buildpacks to be
created even in the face of networks that prevented access to certain hosts.
In practice, this requirement hasn't been necessary (disabling components is
the preferred way to deal with this) and it is more dangerous to allow a
package build to complete without all of the necessary files.  This change
updates the warning message to be a hard failure of the packaging.
  • Loading branch information
nebhale committed Nov 29, 2016
1 parent 46826a0 commit 9786aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rakelib/dependency_cache_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def get_from_cache(configuration, index_configuration, uris)
pin_version(configuration, found_version.to_s) if ENV['PINNED'].to_b

if found_version.nil?
rake_output_message "Unable to resolve version '#{configuration['version']}' for platform " \
"'#{index_configuration[:platform]}'"
raise "Unable to resolve version '#{configuration['version']}' for platform " \
"'#{index_configuration[:platform]}'"
end

uris << index[found_version.to_s] unless found_version.nil?
Expand Down

0 comments on commit 9786aa3

Please sign in to comment.