diff --git a/src/services/functions/build/build.rust.services.ts b/src/services/functions/build/build.rust.services.ts index 846fb4c..d5f77d0 100644 --- a/src/services/functions/build/build.rust.services.ts +++ b/src/services/functions/build/build.rust.services.ts @@ -26,7 +26,6 @@ import {checkCandidExtractor, checkIcWasm, checkWasi2ic} from '../../../utils/bu import {readSatelliteDid} from '../../../utils/did.utils'; import {checkRustVersion} from '../../../utils/env.utils'; import {formatTime} from '../../../utils/format.utils'; -import {isHeadless} from '../../../utils/process.utils'; import {readEmulatorConfigAndCreateDeployTargetDir} from '../../emulator/_fs.services'; import {generateApi, generateDid} from './build.did.services'; import {prepareJunoPkgForSatellite, prepareJunoPkgForSputnik} from './build.metadata.services'; @@ -54,7 +53,7 @@ export const buildRust = async ({ return; } - const {valid: validBindgen} = await checkIcpBindgen({withGlobalFallback: isHeadless()}); + const {valid: validBindgen} = await checkIcpBindgen(); if (!validBindgen) { return; diff --git a/src/utils/build.bindgen.utils.ts b/src/utils/build.bindgen.utils.ts index 1c07b06..1780205 100644 --- a/src/utils/build.bindgen.utils.ts +++ b/src/utils/build.bindgen.utils.ts @@ -6,11 +6,7 @@ import {checkToolInstalled} from './env.utils'; import {detectPackageManager} from './pm.utils'; import {confirmAndExit} from './prompt.utils'; -export const checkIcpBindgen = async ({ - withGlobalFallback -}: { - withGlobalFallback: boolean; -}): Promise<{valid: boolean}> => { +export const checkIcpBindgen = async (): Promise<{valid: boolean}> => { const pm = detectPackageManager(); const {valid: localValid} = await checkLocalIcpBindgen({pm}); @@ -19,17 +15,10 @@ export const checkIcpBindgen = async ({ return {valid: true}; } - if (withGlobalFallback) { - const {valid: globalValid} = await checkGlobalIcpBindgen(); - - if (globalValid === true) { - return {valid: true}; - } + const {valid: globalValid} = await checkGlobalIcpBindgen(); - // Useful the day we require a specific version of the tool. - if (globalValid === false) { - return {valid: globalValid}; - } + if (globalValid === true) { + return {valid: true}; } // Useful the day we require a specific version of the tool.