filter duplicates

pull/3668/head^2
filip mertens 2 years ago
parent 56b74c6c4f
commit 9462f7a168
  1. 7
      apps/remix-ide/ci/download_e2e_assets.js

@ -12,8 +12,11 @@ if (child.error) {
const re = /(?<=soljson).*(?=(.js))/g;
const soljson = child.stdout.match(re);
let soljson = child.stdout.match(re);
if (soljson) {
// filter out duplicates
soljson = soljson.filter((item, index) => soljson.indexOf(item) === index);
console.log('soljson versions found: ', soljson);
for (let i = 0; i < soljson.length; i++) {
const version = soljson[i];
if (version) {
@ -35,7 +38,7 @@ if (soljson) {
// check if the file exists
const exists = fs.existsSync(path);
if (!exists) {
console.log(url)
console.log('URL:', url)
try {
// use curl to download the file
child_process.exec(`curl -o ${path} ${url}`, { encoding: 'utf8', cwd: process.cwd(), shell: true })

Loading…
Cancel
Save