Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 960b179

Browse files
committed
fix: oc get projects fails
Fixes 8928 This is an imperfect PR, in that the resulting Kui table shows "Namespace" in the title.
1 parent 353c579 commit 960b179

File tree

1 file changed

+9
-2
lines changed
  • plugins/plugin-kubectl/oc/src/controller/oc/get

1 file changed

+9
-2
lines changed

plugins/plugin-kubectl/oc/src/controller/oc/get/projects.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ export default function registerOcProjectGet(registrar: Registrar) {
3232

3333
registrar.listen(
3434
'/oc/projects',
35-
args => args.REPL.qexec('oc get projects', undefined, undefined, args.execOptions),
35+
args => args.REPL.qexec('oc get ns', undefined, undefined, args.execOptions),
3636
defaultFlags
3737
)
38+
;['project', 'projects', 'Project', 'Projects'].forEach(project => {
39+
registrar.listen(
40+
`/oc/get/${project}`,
41+
args => args.REPL.qexec('oc get ns', undefined, undefined, args.execOptions),
42+
defaultFlags
43+
)
44+
})
3845

39-
const aliases = ['project', 'projects', 'ns', 'namespace', 'namespaces']
46+
const aliases = ['ns', 'namespace', 'namespaces']
4047
aliases.forEach(ns => {
4148
registrar.listen(`/oc/get/${ns}`, doGet('oc'), defaultFlags)
4249
})

0 commit comments

Comments
 (0)