Merge pull request #2709 from akhilmhdh/feat/recursive-secret-test

Added testing for secret recursive operation
This commit is contained in:
Akhil Mohan
2024-11-29 21:09:17 +05:30
committed by GitHub
3 changed files with 91 additions and 4 deletions
@@ -365,9 +365,8 @@ export const recursivelyGetSecretPaths = async ({
folderId: p.folderId
}));
const pathsInCurrentDirectory = paths.filter((folder) =>
folder.path.startsWith(currentPath === "/" ? "" : currentPath)
);
// path relative will start with ../ if its outside directory
const pathsInCurrentDirectory = paths.filter((folder) => !path.relative(currentPath, folder.path).startsWith(".."));
return pathsInCurrentDirectory;
};