From 9015c43b748360475a19bde735619413b804e4f3 Mon Sep 17 00:00:00 2001 From: nomo-fe Date: Wed, 20 Dec 2023 17:49:27 +0100 Subject: [PATCH] add safety checks for the edge-case that remote-manifests do not have a webon_id or webon_version --- src/services/ssh-manager.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/services/ssh-manager.ts b/src/services/ssh-manager.ts index b274c4b..cdd4269 100644 --- a/src/services/ssh-manager.ts +++ b/src/services/ssh-manager.ts @@ -104,7 +104,17 @@ async function validateDeploymentConfig(deployTarget: string, rawSSH: any) { ); const remoteManifestParsed = JSON.parse(remoteManifest); serverWebOnId = remoteManifestParsed.webon_id; + if (!serverWebOnId) { + logFatal( + `webon_id is missing in the remote-manifest. Please check the remote-manifest on '${remoteManifestPath}'` + ); + } serverWebOnVersion = remoteManifestParsed.webon_version; + if (!serverWebOnVersion) { + logFatal( + `webon_version is missing in the the remote-manifest. Please check the remote-manifest on '${remoteManifestPath}'` + ); + } } manifestChecks({