File tree Expand file tree Collapse file tree 2 files changed +2
-36
lines changed
pkg/devspace/config/loader Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ package loader
22
33import (
44 "fmt"
5- "github.com/loft-sh/devspace/pkg/util/constraint"
65 "io/ioutil"
76 "os"
87 "os/exec"
98 "path/filepath"
109 "regexp"
1110 "strings"
1211
12+ "github.com/loft-sh/devspace/pkg/util/constraint"
13+
1314 "github.com/loft-sh/devspace/pkg/devspace/plugin"
1415 "github.com/loft-sh/devspace/pkg/devspace/upgrade"
1516
@@ -422,10 +423,6 @@ func validateProfile(profile interface{}) error {
422423 }
423424
424425 for idx , patch := range profileConfig .Patches {
425- if vars .VarMatchRegex .MatchString (patch .Path ) {
426- return fmt .Errorf ("patches[%d] path cannot be a variable" , idx )
427- }
428-
429426 if expression .ExpressionMatchRegex .MatchString (patch .Path ) {
430427 return fmt .Errorf ("patches[%d] path cannot be an expression" , idx )
431428 }
Original file line number Diff line number Diff line change @@ -1127,37 +1127,6 @@ profiles:
11271127 },
11281128 },
11291129 },
1130- "Profile with patch path variable" : {
1131- in : & parseTestCaseInput {
1132- config : `
1133- version: v1beta11
1134- deployments:
1135- - name: deployment
1136- helm:
1137- componentChart: true
1138- values:
1139- containers:
1140- - image: nginx
1141- profiles:
1142- - name: testprofile
1143- patches:
1144- - path: ${path}
1145- op: replace
1146- value:
1147- - name: deployment
1148- helm:
1149- componentChart: true
1150- values:
1151- containers:
1152- - image: ubuntu
1153- ` ,
1154- options : & ConfigOptions {Profiles : []string {"testprofile" }},
1155- generatedConfig : & generated.Config {Vars : map [string ]string {
1156- "path" : "deployments" ,
1157- }},
1158- },
1159- expectedErr : "error validating profiles[0]: patches[0] path cannot be a variable" ,
1160- },
11611130 "Profile with patch path expression" : {
11621131 in : & parseTestCaseInput {
11631132 config : `
You can’t perform that action at this time.
0 commit comments