Skip to content

Commit

Permalink
debug bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Rajoria <[email protected]>
  • Loading branch information
aryan-rajoria committed Sep 6, 2024
1 parent 64f8e9e commit 432b35b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pregen.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ export function prepareNodeEnv(filePath, options) {
});
const nodeRe = new RegExp(`^v${nodeVersion}.`);
for (const nodeVersionsIter of nodeVersionArray) {
const fullPath = path.join(possibleNodeDir, nodeVersionsIter.name);
const fullPath = join(possibleNodeDir, nodeVersionsIter.name);
if (
nodeVersionsIter.isDirectory() &&
nodeRe.test(nodeVersionsIter.name)
) {
nvmNodePath = path.join(fullPath, "bin");
nvmNodePath = join(fullPath, "bin");
}
}
if (nvmNodePath) {
Expand Down Expand Up @@ -217,12 +217,12 @@ function createDirectoryTree(directoryPath, maxDepth = 3, currentDepth = 0) {
}

try {
const entries = fs.readdirSync(directoryPath, { withFileTypes: true });
const entries = readdirSync(directoryPath, { withFileTypes: true });
const tree = {};

entries.forEach(entry => {
if (entry.isDirectory()) {
const subDirPath = path.join(directoryPath, entry.name);
const subDirPath = join(directoryPath, entry.name);
tree[entry.name] = createDirectoryTree(subDirPath, maxDepth, currentDepth + 1);
}
});
Expand Down

0 comments on commit 432b35b

Please sign in to comment.