1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix escaping and add comment

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-07-23 14:28:56 -04:00
parent 1c058980f6
commit 68d4502374
3 changed files with 3 additions and 6 deletions

View File

@ -21,7 +21,6 @@
import React from "react"; import React from "react";
import { Common, Renderer } from "@k8slens/extensions"; import { Common, Renderer } from "@k8slens/extensions";
import { inspect } from "util";
type Node = Renderer.K8sApi.Node; type Node = Renderer.K8sApi.Node;
@ -48,7 +47,7 @@ export function NodeMenu(props: NodeMenuProps) {
if (!node) return null; if (!node) return null;
const nodeName = node.getName(); 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) => { const sendToTerminal = (command: string) => {
terminalStore.sendCommand(command, { terminalStore.sendCommand(command, {

View File

@ -23,7 +23,6 @@
import React from "react"; import React from "react";
import { Renderer, Common } from "@k8slens/extensions"; import { Renderer, Common } from "@k8slens/extensions";
import { inspect } from "util";
type Pod = Renderer.K8sApi.Pod; type Pod = Renderer.K8sApi.Pod;
@ -51,7 +50,7 @@ export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
const { object: pod } = this.props; const { object: pod } = this.props;
const commandParts = [ const commandParts = [
inspect(UserPreferences.getKubectlPath(), false, null, false), JSON.stringify(UserPreferences.getKubectlPath()), // this call escapes spaces and quotes
"attach", "attach",
"-i", "-i",
"-t", "-t",

View File

@ -23,7 +23,6 @@
import React from "react"; import React from "react";
import { Renderer, Common } from "@k8slens/extensions"; import { Renderer, Common } from "@k8slens/extensions";
import { inspect } from "util";
type Pod = Renderer.K8sApi.Pod; type Pod = Renderer.K8sApi.Pod;
@ -51,7 +50,7 @@ export class PodShellMenu extends React.Component<PodShellMenuProps> {
const { object: pod } = this.props; const { object: pod } = this.props;
const commandParts = [ const commandParts = [
inspect(UserPreferences.getKubectlPath(), false, null, false), JSON.stringify(UserPreferences.getKubectlPath()), // this call escapes spaces and quotes
"exec", "exec",
"-i", "-i",
"-t", "-t",