From fff3326a32eeb1fb68a0894fbd0bea97f6ccb31a Mon Sep 17 00:00:00 2001 From: Amit Prabhu Date: Sat, 9 Dec 2023 09:29:44 +0530 Subject: [PATCH] Add safety check --- bin/local-install.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/local-install.js b/bin/local-install.js index 455cd20..8bb7f16 100644 --- a/bin/local-install.js +++ b/bin/local-install.js @@ -113,6 +113,9 @@ async function getInstalledPackages() { ); const installedPackages = {}; for (const clusterWorkflowTemplate of clusterWorkflowTemplates.body.items) { + if (!clusterWorkflowTemplate.metadata.annotations || !clusterWorkflowTemplate.metadata.labels) { + continue; + } const package = clusterWorkflowTemplate.metadata.annotations["package.argoproj.io/name"]; const packageVersion = clusterWorkflowTemplate.metadata.labels["package.argoproj.io/version"]; if (package && packageVersion) {