mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
fix ka command in kubernetes module (#884)
substring ..-1 not working. Use str trim to remove '-'
This commit is contained in:
parent
a992f5b4fa
commit
526c9525ea
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ export def --wrapped ka [
|
|||
let n = $namespace | with-flag -n
|
||||
let pod = if ($selector | is-empty) {
|
||||
if ($pod | str ends-with '-') {
|
||||
$"deployment/($pod | str substring ..-1)"
|
||||
$"deployment/($pod | str trim --char '-' --right)"
|
||||
} else {
|
||||
$pod
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue