diff --git a/common/test-runner.mjs b/common/test-runner.mjs index a1f4a9c6d..44b205fc2 100755 --- a/common/test-runner.mjs +++ b/common/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/concept/lasagna/test-runner.mjs b/exercises/concept/lasagna/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/concept/lasagna/test-runner.mjs +++ b/exercises/concept/lasagna/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/accumulate/test-runner.mjs b/exercises/practice/accumulate/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/accumulate/test-runner.mjs +++ b/exercises/practice/accumulate/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/acronym/test-runner.mjs b/exercises/practice/acronym/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/acronym/test-runner.mjs +++ b/exercises/practice/acronym/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/all-your-base/test-runner.mjs b/exercises/practice/all-your-base/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/all-your-base/test-runner.mjs +++ b/exercises/practice/all-your-base/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/allergies/test-runner.mjs b/exercises/practice/allergies/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/allergies/test-runner.mjs +++ b/exercises/practice/allergies/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/alphametics/test-runner.mjs b/exercises/practice/alphametics/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/alphametics/test-runner.mjs +++ b/exercises/practice/alphametics/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/anagram/test-runner.mjs b/exercises/practice/anagram/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/anagram/test-runner.mjs +++ b/exercises/practice/anagram/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/armstrong-numbers/test-runner.mjs b/exercises/practice/armstrong-numbers/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/armstrong-numbers/test-runner.mjs +++ b/exercises/practice/armstrong-numbers/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/atbash-cipher/test-runner.mjs b/exercises/practice/atbash-cipher/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/atbash-cipher/test-runner.mjs +++ b/exercises/practice/atbash-cipher/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/bank-account/test-runner.mjs b/exercises/practice/bank-account/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/bank-account/test-runner.mjs +++ b/exercises/practice/bank-account/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/beer-song/test-runner.mjs b/exercises/practice/beer-song/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/beer-song/test-runner.mjs +++ b/exercises/practice/beer-song/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/binary-search-tree/test-runner.mjs b/exercises/practice/binary-search-tree/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/binary-search-tree/test-runner.mjs +++ b/exercises/practice/binary-search-tree/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/binary-search/test-runner.mjs b/exercises/practice/binary-search/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/binary-search/test-runner.mjs +++ b/exercises/practice/binary-search/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/bob/test-runner.mjs b/exercises/practice/bob/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/bob/test-runner.mjs +++ b/exercises/practice/bob/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/bowling/test-runner.mjs b/exercises/practice/bowling/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/bowling/test-runner.mjs +++ b/exercises/practice/bowling/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/circular-buffer/test-runner.mjs b/exercises/practice/circular-buffer/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/circular-buffer/test-runner.mjs +++ b/exercises/practice/circular-buffer/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/clock/test-runner.mjs b/exercises/practice/clock/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/clock/test-runner.mjs +++ b/exercises/practice/clock/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/collatz-conjecture/test-runner.mjs b/exercises/practice/collatz-conjecture/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/collatz-conjecture/test-runner.mjs +++ b/exercises/practice/collatz-conjecture/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/complex-numbers/test-runner.mjs b/exercises/practice/complex-numbers/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/complex-numbers/test-runner.mjs +++ b/exercises/practice/complex-numbers/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/connect/test-runner.mjs b/exercises/practice/connect/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/connect/test-runner.mjs +++ b/exercises/practice/connect/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/crypto-square/test-runner.mjs b/exercises/practice/crypto-square/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/crypto-square/test-runner.mjs +++ b/exercises/practice/crypto-square/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/custom-set/test-runner.mjs b/exercises/practice/custom-set/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/custom-set/test-runner.mjs +++ b/exercises/practice/custom-set/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/darts/test-runner.mjs b/exercises/practice/darts/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/darts/test-runner.mjs +++ b/exercises/practice/darts/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/diamond/test-runner.mjs b/exercises/practice/diamond/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/diamond/test-runner.mjs +++ b/exercises/practice/diamond/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/difference-of-squares/test-runner.mjs b/exercises/practice/difference-of-squares/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/difference-of-squares/test-runner.mjs +++ b/exercises/practice/difference-of-squares/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/diffie-hellman/test-runner.mjs b/exercises/practice/diffie-hellman/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/diffie-hellman/test-runner.mjs +++ b/exercises/practice/diffie-hellman/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/dnd-character/test-runner.mjs b/exercises/practice/dnd-character/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/dnd-character/test-runner.mjs +++ b/exercises/practice/dnd-character/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/eliuds-eggs/test-runner.mjs b/exercises/practice/eliuds-eggs/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/eliuds-eggs/test-runner.mjs +++ b/exercises/practice/eliuds-eggs/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/etl/test-runner.mjs b/exercises/practice/etl/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/etl/test-runner.mjs +++ b/exercises/practice/etl/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/flatten-array/test-runner.mjs b/exercises/practice/flatten-array/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/flatten-array/test-runner.mjs +++ b/exercises/practice/flatten-array/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/food-chain/test-runner.mjs b/exercises/practice/food-chain/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/food-chain/test-runner.mjs +++ b/exercises/practice/food-chain/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/gigasecond/test-runner.mjs b/exercises/practice/gigasecond/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/gigasecond/test-runner.mjs +++ b/exercises/practice/gigasecond/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/grade-school/test-runner.mjs b/exercises/practice/grade-school/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/grade-school/test-runner.mjs +++ b/exercises/practice/grade-school/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/grains/test-runner.mjs b/exercises/practice/grains/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/grains/test-runner.mjs +++ b/exercises/practice/grains/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/hamming/test-runner.mjs b/exercises/practice/hamming/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/hamming/test-runner.mjs +++ b/exercises/practice/hamming/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/hello-world/test-runner.mjs b/exercises/practice/hello-world/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/hello-world/test-runner.mjs +++ b/exercises/practice/hello-world/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/house/test-runner.mjs b/exercises/practice/house/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/house/test-runner.mjs +++ b/exercises/practice/house/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/isbn-verifier/test-runner.mjs b/exercises/practice/isbn-verifier/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/isbn-verifier/test-runner.mjs +++ b/exercises/practice/isbn-verifier/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/isogram/test-runner.mjs b/exercises/practice/isogram/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/isogram/test-runner.mjs +++ b/exercises/practice/isogram/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/kindergarten-garden/test-runner.mjs b/exercises/practice/kindergarten-garden/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/kindergarten-garden/test-runner.mjs +++ b/exercises/practice/kindergarten-garden/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/knapsack/test-runner.mjs b/exercises/practice/knapsack/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/knapsack/test-runner.mjs +++ b/exercises/practice/knapsack/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/largest-series-product/test-runner.mjs b/exercises/practice/largest-series-product/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/largest-series-product/test-runner.mjs +++ b/exercises/practice/largest-series-product/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/leap/test-runner.mjs b/exercises/practice/leap/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/leap/test-runner.mjs +++ b/exercises/practice/leap/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/linked-list/test-runner.mjs b/exercises/practice/linked-list/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/linked-list/test-runner.mjs +++ b/exercises/practice/linked-list/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/list-ops/test-runner.mjs b/exercises/practice/list-ops/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/list-ops/test-runner.mjs +++ b/exercises/practice/list-ops/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/luhn/test-runner.mjs b/exercises/practice/luhn/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/luhn/test-runner.mjs +++ b/exercises/practice/luhn/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/matching-brackets/test-runner.mjs b/exercises/practice/matching-brackets/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/matching-brackets/test-runner.mjs +++ b/exercises/practice/matching-brackets/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/matrix/test-runner.mjs b/exercises/practice/matrix/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/matrix/test-runner.mjs +++ b/exercises/practice/matrix/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/minesweeper/test-runner.mjs b/exercises/practice/minesweeper/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/minesweeper/test-runner.mjs +++ b/exercises/practice/minesweeper/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/nth-prime/test-runner.mjs b/exercises/practice/nth-prime/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/nth-prime/test-runner.mjs +++ b/exercises/practice/nth-prime/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/nucleotide-count/test-runner.mjs b/exercises/practice/nucleotide-count/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/nucleotide-count/test-runner.mjs +++ b/exercises/practice/nucleotide-count/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/ocr-numbers/test-runner.mjs b/exercises/practice/ocr-numbers/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/ocr-numbers/test-runner.mjs +++ b/exercises/practice/ocr-numbers/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/palindrome-products/test-runner.mjs b/exercises/practice/palindrome-products/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/palindrome-products/test-runner.mjs +++ b/exercises/practice/palindrome-products/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/pangram/test-runner.mjs b/exercises/practice/pangram/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/pangram/test-runner.mjs +++ b/exercises/practice/pangram/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/pascals-triangle/test-runner.mjs b/exercises/practice/pascals-triangle/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/pascals-triangle/test-runner.mjs +++ b/exercises/practice/pascals-triangle/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/perfect-numbers/test-runner.mjs b/exercises/practice/perfect-numbers/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/perfect-numbers/test-runner.mjs +++ b/exercises/practice/perfect-numbers/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/phone-number/test-runner.mjs b/exercises/practice/phone-number/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/phone-number/test-runner.mjs +++ b/exercises/practice/phone-number/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/pig-latin/test-runner.mjs b/exercises/practice/pig-latin/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/pig-latin/test-runner.mjs +++ b/exercises/practice/pig-latin/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/prime-factors/test-runner.mjs b/exercises/practice/prime-factors/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/prime-factors/test-runner.mjs +++ b/exercises/practice/prime-factors/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/protein-translation/test-runner.mjs b/exercises/practice/protein-translation/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/protein-translation/test-runner.mjs +++ b/exercises/practice/protein-translation/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/proverb/test-runner.mjs b/exercises/practice/proverb/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/proverb/test-runner.mjs +++ b/exercises/practice/proverb/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/pythagorean-triplet/test-runner.mjs b/exercises/practice/pythagorean-triplet/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/pythagorean-triplet/test-runner.mjs +++ b/exercises/practice/pythagorean-triplet/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/queen-attack/test-runner.mjs b/exercises/practice/queen-attack/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/queen-attack/test-runner.mjs +++ b/exercises/practice/queen-attack/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/raindrops/test-runner.mjs b/exercises/practice/raindrops/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/raindrops/test-runner.mjs +++ b/exercises/practice/raindrops/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/rational-numbers/test-runner.mjs b/exercises/practice/rational-numbers/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/rational-numbers/test-runner.mjs +++ b/exercises/practice/rational-numbers/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/react/test-runner.mjs b/exercises/practice/react/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/react/test-runner.mjs +++ b/exercises/practice/react/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/rectangles/test-runner.mjs b/exercises/practice/rectangles/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/rectangles/test-runner.mjs +++ b/exercises/practice/rectangles/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/resistor-color-duo/test-runner.mjs b/exercises/practice/resistor-color-duo/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/resistor-color-duo/test-runner.mjs +++ b/exercises/practice/resistor-color-duo/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/resistor-color-trio/test-runner.mjs b/exercises/practice/resistor-color-trio/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/resistor-color-trio/test-runner.mjs +++ b/exercises/practice/resistor-color-trio/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/resistor-color/test-runner.mjs b/exercises/practice/resistor-color/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/resistor-color/test-runner.mjs +++ b/exercises/practice/resistor-color/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/reverse-string/test-runner.mjs b/exercises/practice/reverse-string/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/reverse-string/test-runner.mjs +++ b/exercises/practice/reverse-string/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/rna-transcription/test-runner.mjs b/exercises/practice/rna-transcription/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/rna-transcription/test-runner.mjs +++ b/exercises/practice/rna-transcription/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/robot-name/test-runner.mjs b/exercises/practice/robot-name/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/robot-name/test-runner.mjs +++ b/exercises/practice/robot-name/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/robot-simulator/test-runner.mjs b/exercises/practice/robot-simulator/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/robot-simulator/test-runner.mjs +++ b/exercises/practice/robot-simulator/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/roman-numerals/test-runner.mjs b/exercises/practice/roman-numerals/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/roman-numerals/test-runner.mjs +++ b/exercises/practice/roman-numerals/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/rotational-cipher/test-runner.mjs b/exercises/practice/rotational-cipher/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/rotational-cipher/test-runner.mjs +++ b/exercises/practice/rotational-cipher/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/run-length-encoding/test-runner.mjs b/exercises/practice/run-length-encoding/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/run-length-encoding/test-runner.mjs +++ b/exercises/practice/run-length-encoding/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/saddle-points/test-runner.mjs b/exercises/practice/saddle-points/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/saddle-points/test-runner.mjs +++ b/exercises/practice/saddle-points/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/say/test-runner.mjs b/exercises/practice/say/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/say/test-runner.mjs +++ b/exercises/practice/say/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/scrabble-score/test-runner.mjs b/exercises/practice/scrabble-score/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/scrabble-score/test-runner.mjs +++ b/exercises/practice/scrabble-score/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/secret-handshake/test-runner.mjs b/exercises/practice/secret-handshake/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/secret-handshake/test-runner.mjs +++ b/exercises/practice/secret-handshake/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/series/test-runner.mjs b/exercises/practice/series/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/series/test-runner.mjs +++ b/exercises/practice/series/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/sieve/test-runner.mjs b/exercises/practice/sieve/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/sieve/test-runner.mjs +++ b/exercises/practice/sieve/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/simple-cipher/test-runner.mjs b/exercises/practice/simple-cipher/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/simple-cipher/test-runner.mjs +++ b/exercises/practice/simple-cipher/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/space-age/test-runner.mjs b/exercises/practice/space-age/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/space-age/test-runner.mjs +++ b/exercises/practice/space-age/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/spiral-matrix/test-runner.mjs b/exercises/practice/spiral-matrix/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/spiral-matrix/test-runner.mjs +++ b/exercises/practice/spiral-matrix/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/strain/test-runner.mjs b/exercises/practice/strain/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/strain/test-runner.mjs +++ b/exercises/practice/strain/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/sublist/test-runner.mjs b/exercises/practice/sublist/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/sublist/test-runner.mjs +++ b/exercises/practice/sublist/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/sum-of-multiples/test-runner.mjs b/exercises/practice/sum-of-multiples/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/sum-of-multiples/test-runner.mjs +++ b/exercises/practice/sum-of-multiples/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/tournament/test-runner.mjs b/exercises/practice/tournament/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/tournament/test-runner.mjs +++ b/exercises/practice/tournament/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/transpose/test-runner.mjs b/exercises/practice/transpose/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/transpose/test-runner.mjs +++ b/exercises/practice/transpose/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/triangle/test-runner.mjs b/exercises/practice/triangle/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/triangle/test-runner.mjs +++ b/exercises/practice/triangle/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/twelve-days/test-runner.mjs b/exercises/practice/twelve-days/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/twelve-days/test-runner.mjs +++ b/exercises/practice/twelve-days/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/two-bucket/test-runner.mjs b/exercises/practice/two-bucket/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/two-bucket/test-runner.mjs +++ b/exercises/practice/two-bucket/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/two-fer/test-runner.mjs b/exercises/practice/two-fer/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/two-fer/test-runner.mjs +++ b/exercises/practice/two-fer/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/variable-length-quantity/test-runner.mjs b/exercises/practice/variable-length-quantity/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/variable-length-quantity/test-runner.mjs +++ b/exercises/practice/variable-length-quantity/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/word-count/test-runner.mjs b/exercises/practice/word-count/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/word-count/test-runner.mjs +++ b/exercises/practice/word-count/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/word-search/test-runner.mjs b/exercises/practice/word-search/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/word-search/test-runner.mjs +++ b/exercises/practice/word-search/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null diff --git a/exercises/practice/wordy/test-runner.mjs b/exercises/practice/wordy/test-runner.mjs index a1f4a9c6d..44b205fc2 100644 --- a/exercises/practice/wordy/test-runner.mjs +++ b/exercises/practice/wordy/test-runner.mjs @@ -25,7 +25,7 @@ */ import { execSync } from 'node:child_process' -import { readFileSync, existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import { exit } from 'node:process' import { URL } from 'node:url' @@ -38,7 +38,7 @@ const metaDirectory = new URL('./.meta/', import.meta.url) const exercismDirectory = new URL('./.exercism/', import.meta.url) const configDirectory = existsSync(metaDirectory) ? metaDirectory - : execSync(exercismDirectory) + : existsSync(exercismDirectory) ? exercismDirectory : null