From 0e5fd407b9f6867a1d3b1ed957fd488071ba507b Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sat, 27 Mar 2021 16:16:25 -0700 Subject: [PATCH] Misc fixes --- tools/depgraph.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tools/depgraph.js b/tools/depgraph.js index 526fa3a..534d017 100644 --- a/tools/depgraph.js +++ b/tools/depgraph.js @@ -130,7 +130,11 @@ async function getImageArtifact({ tag, isBaseImage, isLangImage }) { return await hashDockerfile(name, dependentDockerHashes, { salt }); }, buildLocally: async () => { - await runCommand(`make image I=${tag}`); + if (isLangImage) { + await runCommand(`make image I=${name} L=${isLangImage.lang}`); + } else { + await runCommand(`make image I=${name}`); + } }, retrieveFromRegistry: async () => { await runCommand(`make pull I=${tag}`); @@ -563,15 +567,19 @@ async function executeDepGraph({ .join(", ") ); console.log(); - console.log("Do you want to perform these actions?"); - console.log(" Depgraph will perform the actions described above."); - console.log(" Only 'yes' will be accepted to approve."); - console.log(); - const resp = await getUserInput(" Enter a value: "); - if (resp !== "yes") { + if (yes) { + console.log("Skipping confirmation since --yes was passed."); + } else { + console.log("Do you want to perform these actions?"); + console.log(" Depgraph will perform the actions described above."); + console.log(" Only 'yes' will be accepted to approve."); console.log(); - console.log("Apply cancelled."); - process.exit(1); + const resp = await getUserInput(" Enter a value: "); + if (resp !== "yes") { + console.log(); + console.log("Apply cancelled."); + process.exit(1); + } } for (let idx = 0; idx < plan.length; idx++) { const { artifact, action } = plan[idx];