Skip to content

Commit

Permalink
Fix call to existsSync (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte authored Aug 7, 2024
1 parent 66f6cb4 commit fbc6864
Show file tree
Hide file tree
Showing 100 changed files with 200 additions and 200 deletions.
4 changes: 2 additions & 2 deletions common/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/concept/lasagna/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/accumulate/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/acronym/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/all-your-base/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/allergies/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/alphametics/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/anagram/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/armstrong-numbers/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/atbash-cipher/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/bank-account/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/beer-song/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/binary-search-tree/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/binary-search/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/bob/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/bowling/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/circular-buffer/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/clock/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/collatz-conjecture/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/complex-numbers/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/connect/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/crypto-square/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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

Expand Down
Loading

0 comments on commit fbc6864

Please sign in to comment.