diff options
| author | Michael Matloob <matloob@golang.org> | 2023-07-10 13:26:46 -0400 |
|---|---|---|
| committer | Michael Matloob <matloob@google.com> | 2023-07-12 16:41:32 +0000 |
| commit | f36927e488132f6f557327e5dd83ea462dfed99d (patch) | |
| tree | 7dcf832e242035ce8da33d2a69a8e0c938d38ca8 /cmd/pkgsite | |
| parent | c3b0492b250254e3259b20b076f680213f7cfd6d (diff) | |
| download | go-x-pkgsite-f36927e488132f6f557327e5dd83ea462dfed99d.tar.xz | |
internal: fix build on Windows
Disable some of the vuln tests on windows because one of the path
conversion functions fails with an error saying it doesn't work on
Windows. Also fix the behavior on windows for /file paths. It looks
like they are intended to be /file/+filepath.ToSlash(filesystemPath)
when on Windows. Make sure we always generate those paths, and check
for those paths.
Change-Id: I23738b463b1415f2a75598dab4eaa511791f8e7e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/508503
Run-TryBot: Michael Matloob <matloob@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'cmd/pkgsite')
| -rw-r--r-- | cmd/pkgsite/main_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/pkgsite/main_test.go b/cmd/pkgsite/main_test.go index 0be2a34d..b23f95f6 100644 --- a/cmd/pkgsite/main_test.go +++ b/cmd/pkgsite/main_test.go @@ -71,7 +71,7 @@ package a modcacheChecker := in("", in(".Documentation", hasText("var V = 1")), - sourceLinks(path.Join(abs(cacheDir), "modcache.com@v1.0.0"), "a.go")) + sourceLinks(path.Join(filepath.ToSlash(abs(cacheDir)), "modcache.com@v1.0.0"), "a.go")) ctx := context.Background() for _, test := range []struct { @@ -88,7 +88,7 @@ package a http.StatusOK, in("", in(".Documentation", hasText("There is no documentation for this package.")), - sourceLinks(path.Join(abs(localModule), "example.com/testmod"), "a.go")), + sourceLinks(path.Join(filepath.ToSlash(abs(localModule)), "example.com/testmod"), "a.go")), }, { "modcache", |
