Skip to content

Commit

Permalink
fix(plugins/plugin-kubectl): delete button does not pass through --ku…
Browse files Browse the repository at this point in the history
…beconfig
  • Loading branch information
starpit committed Sep 3, 2022
1 parent 16f249d commit 49e67e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/plugin-kubectl/src/lib/view/modes/DeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
*/

import React from 'react'
import { i18n, Tab } from '@kui-shell/core'
import { i18n, Tab, ParsedOptions } from '@kui-shell/core'
import { Icons } from '@kui-shell/plugin-client-common'

import { KubeResource, isCrudableKubeResource as when } from '../../model/resource'
import { fqnOf } from '../../../controller/kubectl/fqn'
import { getCommandFromArgs } from '../../../lib/util/util'
import { withKubeconfigFrom } from '../../../controller/kubectl/options'

const strings = i18n('plugin-kubectl')

/** Formulate the delete command line */
function command(tab: Tab, resource: KubeResource, args: { argvNoOptions: string[] }) {
return `${getCommandFromArgs(args)} delete ${fqnOf(resource)}`
function command(tab: Tab, resource: KubeResource, args: { argvNoOptions: string[]; parsedOptions: ParsedOptions }) {
return withKubeconfigFrom(args, `${getCommandFromArgs(args)} delete ${fqnOf(resource)}`)
}

/** The Delete button mode */
Expand Down

0 comments on commit 49e67e8

Please # to comment.