Skip to content

Commit

Permalink
try/actach errors when looping
Browse files Browse the repository at this point in the history
  • Loading branch information
clemsos committed Mar 11, 2024
1 parent f72a703 commit 41d0f11
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions governance/scripts/all_networks
Expand Up @@ -32,7 +32,12 @@ for (let i = 0; i < networks.length; i++) {
const args = ['--network', networks[i], ...process.argv.slice(2)]

console.log(cmd, args)
execSync(`${cmd} ${args.join(' ')}`, {
stdio: 'inherit',
})
try {
execSync(`${cmd} ${args.join(' ')}`, {
stdio: 'inherit',
})
} catch (error) {
console.log(`Network ${networks[i]} failed`)
console.log(error.message)
}
}

0 comments on commit 41d0f11

Please sign in to comment.