Skip to content

Commit

Permalink
fix: replace fse.esistSync with find-up helper
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Feb 6, 2022
1 parent 0f43e6e commit ae3eda5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/ts/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import chalk from 'chalk'
import cp, { StdioOptions } from 'child_process'
import { findUpSync } from 'find-up'
import fse from 'fs-extra'
import { findUpSync, pathExistsSync } from 'find-up'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'path'
import { packageDirectorySync } from 'pkg-dir'
Expand Down Expand Up @@ -92,7 +91,7 @@ export const findBin = (cmd: string, cwd: string) => findUpSync(
(dir) => {
const ref = resolve(dir, 'node_modules', '.bin', cmd)

return fse.existsSync(ref) ? ref : undefined
return pathExistsSync(ref) ? ref : undefined
},
{ cwd, type: 'file', allowSymlinks: true },
)
Expand Down

0 comments on commit ae3eda5

Please sign in to comment.