mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
test(install): build the localhost file URL from a slash path
On Windows the temp path starts with a drive letter, so prefixing it onto file://localhost produced file://localhostC:\... instead of a valid URL and the case failed on the Windows runner. Convert to slashes and add the separator explicitly.
This commit is contained in:
@@ -325,7 +325,7 @@ func TestInstallTrackedRepo_RefusesLocalSourceInsideTheDestination(t *testing.T)
|
||||
{"same path", "", func(p string) string { return p }, false},
|
||||
{"nested path", "nested", func(p string) string { return p }, false},
|
||||
{"explicit file URL", "nested", func(p string) string { return fileURL(p) }, false},
|
||||
{"localhost file URL", "nested", func(p string) string { return "file://localhost" + p }, false},
|
||||
{"localhost file URL", "nested", func(p string) string { return "file://localhost/" + strings.TrimPrefix(filepath.ToSlash(p), "/") }, false},
|
||||
{"dry run", "nested", func(p string) string { return p }, true},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
|
||||
Reference in New Issue
Block a user