fix black path entry

pull/5370/head
ioedeveloper 12 months ago committed by Aniket
parent 1e985fd91d
commit f537e27d0f
  1. 7
      apps/circuit-compiler/src/app/services/circomPluginClient.ts

@ -308,12 +308,11 @@ export class CircomPluginClient extends PluginClient {
// extract all includes from the dependency content
const dependencyIncludes = (dependencyContent.match(/include ['"].*['"]/g) || []).map((childInclude) => {
const includeName = childInclude.replace(/include ['"]/g, '').replace(/['"]/g, '')
let absFilePath = pathModule.resolve(include.slice(0, include.lastIndexOf('/')), includeName)
if (!blackPath.includes(includeName)) {
absFilePath = include.startsWith('circomlib') ? absFilePath.substring(1) : absFilePath
if (!blackPath.includes(absFilePath)) {
if(!includeName.startsWith('circomlib')) {
let absFilePath = pathModule.resolve(include.slice(0, include.lastIndexOf('/')), includeName)
absFilePath = include.startsWith('circomlib') ? absFilePath.substring(1) : absFilePath
dependencyContent = dependencyContent.replace(`${includeName}`, `${absFilePath}`)
return absFilePath
}

Loading…
Cancel
Save