Skip to content

Commit

Permalink
Add ":file" to the list of supported sources
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Zholobov <[email protected]>
  • Loading branch information
legal90 committed Jan 4, 2018
1 parent f6f9973 commit 7145ebd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/omnibus/software.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def source(val = NULL)
val = canonicalize_source(val)

extra_keys = val.keys - [
:git, :path, :url, # fetcher types
:git, :file, :path, :url, # fetcher types
:md5, :sha1, :sha256, :sha512, # hash type - common to all fetchers
:cookie, :warning, :unsafe, :extract, # used by net_fetcher
:options, # used by path_fetcher
Expand All @@ -303,7 +303,7 @@ def source(val = NULL)
"only include valid keys. Invalid keys: #{extra_keys.inspect}")
end

duplicate_keys = val.keys & [:git, :path, :url]
duplicate_keys = val.keys & [:git, :file, :path, :url]
unless duplicate_keys.size < 2
raise InvalidValue.new(:source,
"not include duplicate keys. Duplicate keys: #{duplicate_keys.inspect}")
Expand Down Expand Up @@ -1053,6 +1053,8 @@ def source_type
:url
elsif source[:git]
:git
elsif source[:file]
:file
elsif source[:path]
:path
end
Expand Down

0 comments on commit 7145ebd

Please sign in to comment.