From 3775e220a328c433925814be6fc6cfdfeb43a25c Mon Sep 17 00:00:00 2001 From: CNCF-bot Date: Wed, 12 Jul 2023 13:40:53 +0100 Subject: [PATCH] report progress --- netlify/landscape.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/netlify/landscape.js b/netlify/landscape.js index 7c0c7e53..5ef58dc4 100644 --- a/netlify/landscape.js +++ b/netlify/landscape.js @@ -30,11 +30,14 @@ const debug = function() { } } -const runLocal = function(command) { +const runLocal = function(command, showProgress) { // report the output once every 5 seconds let lastOutput = { s: '', time: new Date().getTime() }; let displayIfRequired = function(text) { + if (showProgress) { + console.info(text); + } lastOutput.s = lastOutput.s + text; } @@ -89,7 +92,7 @@ const runRemote = async function(command, count = 3) { ${command} EOSSH ` - const result = await runLocal(bashCommand); + const result = await runLocal(bashCommand, true); if (result.exitCode === 255 && count > 0) { console.info(`Attempts to retry more: ${count}`); return await runRemote(command, count - 1);