Skip to content

Commit

Permalink
hoist fs
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Jun 6, 2024
1 parent ce7bada commit cb8bfc1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const fs = require('graceful-fs').promises
const gracefulFs = require('graceful-fs')
const fs = gracefulFs.promises
const path = require('path')
const { glob } = require('glob')
const log = require('./log')
Expand Down Expand Up @@ -85,7 +86,7 @@ async function build (gyp, argv) {
async function findSolutionFile () {
const files = await glob('build/*.sln')
if (files.length === 0) {
if (require('fs').existsSync('build/Makefile') || (await glob('build/*.mk')).length !== 0) {
if (gracefulFs.existsSync('build/Makefile') || (await glob('build/*.mk')).length !== 0) {
command = makeCommand
await doWhich(false)
return
Expand Down

0 comments on commit cb8bfc1

Please sign in to comment.