diff --git a/dist/index.js b/dist/index.js index c0e8ac2..9c6b08e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4365,8 +4365,8 @@ const fs = __nccwpck_require__(7147) async function generateTestResults() { // Specify the path to your file - exec('sudo cp /home/mitmproxyuser/output.log output.log') - exec('sudo chown -R $USER:$USER output.log') + await exec('sudo cp /home/mitmproxyuser/output.log output.log') + await exec('sudo chown -R $USER:$USER output.log') const filePath = 'output.log' try { @@ -4390,6 +4390,7 @@ async function generateTestResults() { return jsonArray } catch (error) { console.error(`Error reading file: ${error.message}`) + return [] } } @@ -4414,9 +4415,6 @@ function getUniqueBy(arr, keys) { } async function summary() { - await exec('sudo cat /home/mitmproxyuser/bolt.log') - await exec('sudo cat /home/mitmproxyuser/bolt-error.log') - await exec('sudo systemctl status bolt') const results = await generateTestResults() const uniqueResults = getUniqueBy(results, ['domain', 'scheme']).map( result => [ diff --git a/src/summary.js b/src/summary.js index 5971222..91a8b56 100644 --- a/src/summary.js +++ b/src/summary.js @@ -5,8 +5,8 @@ const fs = require('fs') async function generateTestResults() { // Specify the path to your file - exec('sudo cp /home/mitmproxyuser/output.log output.log') - exec('sudo chown -R $USER:$USER output.log') + await exec('sudo cp /home/mitmproxyuser/output.log output.log') + await exec('sudo chown -R $USER:$USER output.log') const filePath = 'output.log' try { @@ -30,6 +30,7 @@ async function generateTestResults() { return jsonArray } catch (error) { console.error(`Error reading file: ${error.message}`) + return [] } } @@ -54,9 +55,6 @@ function getUniqueBy(arr, keys) { } async function summary() { - await exec('sudo cat /home/mitmproxyuser/bolt.log') - await exec('sudo cat /home/mitmproxyuser/bolt-error.log') - await exec('sudo systemctl status bolt') const results = await generateTestResults() const uniqueResults = getUniqueBy(results, ['domain', 'scheme']).map( result => [