From bc99a5a27abf849306e61ade4ea849a00ec9bc5c Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 8 Nov 2021 10:18:07 -0500 Subject: [PATCH] Add comment about linux fallback Signed-off-by: Sebastian Malton --- src/main/shell-session/node-shell-session.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/shell-session/node-shell-session.ts b/src/main/shell-session/node-shell-session.ts index 468ec2eb6e..84a5b0d920 100644 --- a/src/main/shell-session/node-shell-session.ts +++ b/src/main/shell-session/node-shell-session.ts @@ -28,6 +28,7 @@ import { ShellOpenError, ShellSession } from "./shell-session"; import { get } from "lodash"; import { Node, NodesApi } from "../../common/k8s-api/endpoints"; import { KubeJsonApi } from "../../common/k8s-api/kube-json-api"; +import logger from "../logger"; export class NodeShellSession extends ShellSession { ShellType = "node-shell"; @@ -67,14 +68,14 @@ export class NodeShellSession extends ShellSession { const nodeOs = node.getOperatingSystem(); switch (nodeOs) { + default: + logger.warn(`[NODE-SHELL-SESSION]: could not determine node OS, falling back with assumption of linux`); case "linux": args.push("sh", "-c", "((clear && bash) || (clear && ash) || (clear && sh))"); break; case "windows": args.push("powershell"); break; - default: - throw new Error(`Cannot open node shell for ${this.nodeName}: unknown operating sytem ${nodeOs}`); } return super.open(shell, args, env);