Skip to content

Commit 26792f7

Browse files
authored
Merge pull request #270 from hatemhosny/fix-fetch-algorithms
Fix fetching algorithms
2 parents b811e1e + 74880a9 commit 26792f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/repositories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const Repositories = {
6464
},
6565
r: {
6666
name: "R",
67-
allowedFiles: [".R"],
67+
allowedFiles: [".r"],
6868
baseDir: ".",
6969
},
7070
ruby: {

scripts/fetch-algorithms.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const categoriesToSkip = ["main", "src", "algorithms", "problems"];
7373
(repo) =>
7474
new Promise<void>((resolve, reject) => {
7575
exec(
76-
`git clone https://github.com/TheAlgorithms/${repo}.git`,
76+
`git clone --depth 1 https://github.com/TheAlgorithms/${repo}.git`,
7777
(err) => {
7878
if (err) reject(err);
7979
else resolve();
@@ -550,10 +550,10 @@ const categoriesToSkip = ["main", "src", "algorithms", "problems"];
550550
function isValidCategory(name: string) {
551551
if (normalize(name).match(/problem\d+/)) return false;
552552
for (const exclude of categoriesToIgnore)
553-
for (const category of name.split("/"))
553+
for (const category of name.split(path.sep))
554554
if (normalize(category) === normalize(exclude)) return false;
555555
for (const exclude of ["__init__", "mod.rs"])
556-
for (const category of name.split("/"))
556+
for (const category of name.split(path.sep))
557557
if (category === exclude) return false;
558558
return true;
559559
}

0 commit comments

Comments
 (0)