reverting the fix for URL parsing

This commit is contained in:
Kevin Woley
2021-02-22 05:36:53 -08:00
parent ed92f4e213
commit 6bfba97a4c

View File

@@ -244,7 +244,7 @@ function Invoke-ConnectivityCheck {
else {
# parse connection string for hostname
# Uri parser doesn't handle leading connection type info (s3:, sftp:, rest:)
$connection_string = $env:RESTIC_REPOSITORY -replace "^s3:","s3://" -replace "^sftp:","sftp://" -replace "^rest:","rest://"
$connection_string = $env:RESTIC_REPOSITORY -replace "^s3:" -replace "^sftp:" -replace "^rest:"
$repository_host = ([System.Uri]$connection_string).host
}