Skip to content

Commit

Permalink
add safety checks for the edge-case that remote-manifests do not have…
Browse files Browse the repository at this point in the history
… a webon_id or webon_version
  • Loading branch information
nomo-app committed Dec 20, 2023
1 parent 8a773e2 commit 9015c43
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/services/ssh-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 9015c43

Please sign in to comment.