Skip to content

Commit

Permalink
Fix not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbush committed Feb 2, 2024
1 parent cc6ddc0 commit 1743031
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions infrastructure/zk/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,20 @@ export async function init(initArgs: InitArgs = DEFAULT_ARGS) {

// Find the line that contains the parameter
const lines2 = tomlContent2.split('\n');
let found = false;

for (let i = 0; i < lines2.length; i++) {
const line = lines2[i];
if (line.includes(`${paramName2} =`)) {
lines2[i] = validiumMode ? `${paramName2} = ${newValue}` : '';
if (line.includes(`${paramName2}=`)) {
lines2[i] = validiumMode ? `${paramName2}=${newValue}` : '';
found = true;
break;
}
}

if (!found) {
if (validiumMode) {
lines2[-1] += `${paramName2}=${newValue}`
}
}

Expand Down

0 comments on commit 1743031

Please sign in to comment.