From 206c88ea5227bc6095965fccda820721b1b77ff4 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 23 Dec 2020 13:12:25 +0200 Subject: [PATCH] Fix vmware distro detect (#1817) * fix vmware distro detect Signed-off-by: Jari Kolehmainen * Change method orders to avoid conflicts Signed-off-by: Lauri Nevala Co-authored-by: Lauri Nevala --- src/main/cluster-detectors/distribution-detector.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/cluster-detectors/distribution-detector.ts b/src/main/cluster-detectors/distribution-detector.ts index 62c4dcacd5..86cf24e6f4 100644 --- a/src/main/cluster-detectors/distribution-detector.ts +++ b/src/main/cluster-detectors/distribution-detector.ts @@ -36,6 +36,10 @@ export class DistributionDetector extends BaseClusterDetector { return { value: "digitalocean", accuracy: 90}; } + if (this.isVMWare()) { + return { value: "vmware", accuracy: 90}; + } + if (this.isMirantis()) { return { value: "mirantis", accuracy: 90}; } @@ -123,6 +127,10 @@ export class DistributionDetector extends BaseClusterDetector { return this.version.includes("+"); } + protected isVMWare() { + return this.version.includes("+vmware"); + } + protected isRke() { return this.version.includes("-rancher"); }