diff --git a/extensions/node-menu/src/node-menu.tsx b/extensions/node-menu/src/node-menu.tsx index be5ebdcb9e..a2412ec285 100644 --- a/extensions/node-menu/src/node-menu.tsx +++ b/extensions/node-menu/src/node-menu.tsx @@ -21,7 +21,6 @@ import React from "react"; import { Common, Renderer } from "@k8slens/extensions"; -import { inspect } from "util"; type Node = Renderer.K8sApi.Node; @@ -48,7 +47,7 @@ export function NodeMenu(props: NodeMenuProps) { if (!node) return null; const nodeName = node.getName(); - const kubectlPath = inspect(UserPreferences.getKubectlPath(), false, null, false); + const kubectlPath = JSON.stringify(UserPreferences.getKubectlPath()); // this call escapes spaces and quotes const sendToTerminal = (command: string) => { terminalStore.sendCommand(command, { diff --git a/extensions/pod-menu/src/attach-menu.tsx b/extensions/pod-menu/src/attach-menu.tsx index ab9476a0dc..e1e63b1e36 100644 --- a/extensions/pod-menu/src/attach-menu.tsx +++ b/extensions/pod-menu/src/attach-menu.tsx @@ -23,7 +23,6 @@ import React from "react"; import { Renderer, Common } from "@k8slens/extensions"; -import { inspect } from "util"; type Pod = Renderer.K8sApi.Pod; @@ -51,7 +50,7 @@ export class PodAttachMenu extends React.Component { const { object: pod } = this.props; const commandParts = [ - inspect(UserPreferences.getKubectlPath(), false, null, false), + JSON.stringify(UserPreferences.getKubectlPath()), // this call escapes spaces and quotes "attach", "-i", "-t", diff --git a/extensions/pod-menu/src/shell-menu.tsx b/extensions/pod-menu/src/shell-menu.tsx index ba71cd1a2b..01921626df 100644 --- a/extensions/pod-menu/src/shell-menu.tsx +++ b/extensions/pod-menu/src/shell-menu.tsx @@ -23,7 +23,6 @@ import React from "react"; import { Renderer, Common } from "@k8slens/extensions"; -import { inspect } from "util"; type Pod = Renderer.K8sApi.Pod; @@ -51,7 +50,7 @@ export class PodShellMenu extends React.Component { const { object: pod } = this.props; const commandParts = [ - inspect(UserPreferences.getKubectlPath(), false, null, false), + JSON.stringify(UserPreferences.getKubectlPath()), // this call escapes spaces and quotes "exec", "-i", "-t",