lib/bolt/target.rb in bolt-1.8.1 vs lib/bolt/target.rb in bolt-1.9.0
- old
+ new
@@ -60,9 +60,11 @@
Addressable::URI.parse(string)
else
# Initialize with an empty scheme to ensure we parse the hostname correctly
Addressable::URI.parse("//#{string}")
end
+ rescue Addressable::URI::InvalidURIError => e
+ raise Bolt::ParseError, "Could not parse target URI: #{e.message}"
end
private :parse
def features
if @inventory