Fixed async isues with index #91

The index runs async everywhere, it's kinda impossible to know which path with resolve first, so testing is hard. Sometimes a race condition is hit, well, it was. Now that map has a mutex on it.

Also fully fixed handling files with relative links. A basepath property has been added to the index configuration to allow a local root to be set when resolving files.

Added a full checkout test for digital ocean so that full remote and full local testing is performed.
This commit is contained in:
Dave Shanley
2023-03-06 09:40:50 -05:00
parent 0850ceb272
commit 0f2ac08567
7 changed files with 197 additions and 109 deletions

View File

@@ -433,7 +433,12 @@ func GenerateCleanSpecConfigBaseURL(baseURL *url.URL, dir string, includeFile bo
if baseURL.Scheme != "" && !strings.HasPrefix(dir, "http") {
p = fmt.Sprintf("%s://%s%s", baseURL.Scheme, baseURL.Host, cleanedPath)
} else {
p = cleanedPath
if !strings.Contains(cleanedPath, "/") {
p = ""
} else {
p = cleanedPath
}
}
if strings.HasSuffix(p, "/") {
p = p[:len(p)-1]