Commit 30947cb7 authored by Indeavr's avatar Indeavr

fix (generate-artifacts): Unicode fix for the output files = '\' replaced...

fix (generate-artifacts): Unicode fix for the output files  = '\' replaced with '/' because \u is considered a symbol & build throws an error
parent 9036a066
......@@ -30,7 +30,9 @@ const main = async () => {
.map((artifactPath) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const artifact = require(artifactPath)
const relPath = path.relative(__dirname, artifactPath)
// handles the case - '\u' (\utils folder) is considered as an unicode encoded char
const pattern=/\\/g;
const relPath = path.relative(__dirname, artifactPath).replace(pattern,"/")
return `
let ${artifact.contractName}
try {
......
......@@ -27,6 +27,8 @@ const main = async () => {
})
const artifactNames = []
const pattern=/\\/g;
for (const deploymentName of deploymentNames) {
const deploymentArtifacts = glob.sync(
path.join(
......@@ -37,7 +39,7 @@ const main = async () => {
)
for (const artifactPath of deploymentArtifacts) {
const relPath = path.relative(__dirname, artifactPath)
const relPath = path.relative(__dirname, artifactPath).replace(pattern,"/")
const contractName = path.basename(artifactPath, '.json')
const artifactName = `${deploymentName}__${contractName}`.replace(
/-/g,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment