voxpupuli / puppet-staging

⛔️ Deprecated in favor of puppet-archive
https://forge.puppet.com/puppet/archive
Apache License 2.0
51 stars 109 forks source link

[staging_parse] Raise error if given invalid source #11

Closed adrienthebo closed 11 years ago

adrienthebo commented 11 years ago

A string like 'foo:bar' is a valid URI but contains no path. URI.parse('foo:bar') returns nil, and calling File.extname(nil) raises "can't convert nil into String".

This commit ensures that the given URI has a valid path and fails early if the input is malformed.