INNER CODE UNIT · JavaScript

logDebug

justadudewhohacks/opencv4nodejs · lib/cv.js:7

const logDebug = process.env.OPENCV4NODES_DEBUG_REQUIRE ? require('npmlog').info : () => {}

function tryGetOpencvBinDir() {
  if (process.env.OPENCV_BIN_DIR) {
    logDebug('tryGetOpencvBinDir', 'OPENCV_BIN_DIR environment variable is set')
    return process.env.OPENCV_BIN_DIR
  }
  // if the auto build is not disabled via environment do not even attempt
  // to read package.json
  if (!opencvBuild.isAutoBuildDisabled()) {
    logDebug('tryGetOpencvBinDir', 'auto build has not been disabled via environment variable, using opencv bin dir of opencv-build')
    return opencvBuild.opencvBinDir
  }

  logDebug('tryGetOpencvBinDir', 'auto build has not been explicitly disabled via environment variable, attempting to read envs from package.json...')
  const envs = opencvBuild.readEnvsFromPackageJson()

  if (!envs.disableAutoBuild) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…