From 3f0d770be05517fb02e58609bfeac3a3fb7490ee Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Tue, 23 Jan 2024 15:04:18 +0100 Subject: [PATCH] Revert "Alert on wsl.localhost Path (#1522)" (#1597) This reverts commit a5ff862d4afdad2415b346aba9c3e52f127b1ce1. --- internal/uri/uri.go | 10 +--------- internal/uri/uri_test.go | 5 ----- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/internal/uri/uri.go b/internal/uri/uri.go index 76633110f..90ba3b05a 100644 --- a/internal/uri/uri.go +++ b/internal/uri/uri.go @@ -206,13 +206,5 @@ func IsWSLURI(uri string) bool { return false } - if u.Scheme == "file" && u.Host == "wsl$" { - return true - } - - if u.Scheme == "file" && u.Host == "wsl.localhost" { - return true - } - - return false + return u.Scheme == "file" && u.Host == "wsl$" } diff --git a/internal/uri/uri_test.go b/internal/uri/uri_test.go index a9c289df9..e75aa5a66 100644 --- a/internal/uri/uri_test.go +++ b/internal/uri/uri_test.go @@ -193,11 +193,6 @@ func TestIsWSLURI(t *testing.T) { uri: `file://wsl%24/Ubuntu/home/james/some/path`, want: true, }, - { - name: "Localhost WSL file path should return true", - uri: `file://wsl.localhost/Ubuntu/home/james/foo`, - want: true, - }, { name: "Regular file path should return false", uri: `file://C:/foo/james/foo`,