use path.sep instead of / to accound for differnt platforms (#8380)

Signed-off-by: Emma Indal <emmai@spotify.com>
This commit is contained in:
Emma Indal
2021-12-06 14:29:07 +01:00
committed by GitHub
parent 884c451191
commit 594e73aa1c
@@ -384,7 +384,7 @@ export const createOrUpdateMetadata = async (
// a form appropriate for invalidating the associated object from cache.
try {
json.files = (await getFileTreeRecursively(techdocsMetadataDir)).map(file =>
file.replace(`${techdocsMetadataDir}/`, ''),
file.replace(`${techdocsMetadataDir}${path.sep}`, ''),
);
} catch (err) {
assertError(err);