Skip to content

Commit c9f64d0

Browse files
committed
chore(volumes): modify mount path regexp
1 parent b33f6b8 commit c9f64d0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cmd/volumes.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ func (d *DryccCmd) VolumesUnmount(appID string, name string, volumeVars []string
219219

220220
func parseVolume(volumeVars []string) (map[string]interface{}, error) {
221221
volumeMap := make(map[string]interface{})
222-
223-
regex := regexp.MustCompile(`^([A-z_]+[A-z0-9_]*)=([\s\S]*)$`)
222+
regex := regexp.MustCompile(`^([a-z0-9]+(?:-[a-z0-9]+)*)=(\/(\w+\/?)+)$`)
224223
for _, volume := range volumeVars {
225224
if regex.MatchString(volume) {
226225
captures := regex.FindStringSubmatch(volume)

0 commit comments

Comments
 (0)