mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-06-09 17:00:00 -04:00
Merge pull request #98158 from dougsland/kubectlExternalDiff
kubectl diff: update regex to allow equal sign Kubernetes-commit: ab21bdba898586e0e775637455f9837031ea89c2
This commit is contained in:
commit
5656dff604
1 changed files with 2 additions and 2 deletions
|
|
@ -177,8 +177,8 @@ func (d *DiffProgram) getCommand(args ...string) (string, exec.Cmd) {
|
|||
diff = diffCommand[0]
|
||||
|
||||
if len(diffCommand) > 1 {
|
||||
// Regex accepts: Alphanumeric (case-insensitive) and dash
|
||||
isValidChar := regexp.MustCompile(`^[a-zA-Z0-9-]+$`).MatchString
|
||||
// Regex accepts: Alphanumeric (case-insensitive), dash and equal
|
||||
isValidChar := regexp.MustCompile(`^[a-zA-Z0-9-=]+$`).MatchString
|
||||
for i := 1; i < len(diffCommand); i++ {
|
||||
if isValidChar(diffCommand[i]) {
|
||||
args = append(args, diffCommand[i])
|
||||
|
|
|
|||
Loading…
Reference in a new issue