From cb8bfc15ed780a6e9940bc7879f33a8d97e68b64 Mon Sep 17 00:00:00 2001 From: toyobayashi Date: Thu, 6 Jun 2024 22:11:41 +0800 Subject: [PATCH] hoist fs --- lib/build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/build.js b/lib/build.js index fef817ea0a..e1f49bb6ff 100644 --- a/lib/build.js +++ b/lib/build.js @@ -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') @@ -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