fix extra / in paths

This commit is contained in:
Lilian Jónsdóttir 2024-05-07 16:24:08 -07:00
parent 7d24d5e70b
commit 64bf6863e5

7
pkg/env/env.go vendored
View file

@ -108,7 +108,12 @@ func make_path(paths ...string) string {
}
for _, path := range paths {
output.WriteString(path + sep)
// don't add / to the end if it's there
if strings.HasSuffix(path, sep) {
output.WriteString(path)
} else {
output.WriteString(path + sep)
}
}
return output.String()