Skip to content

Commit e001146

Browse files
authored
chore(volume): mount path allow '-' (#44)
1 parent 44b4503 commit e001146

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/volumes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +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-
regex := regexp.MustCompile(`^([a-z0-9]+(?:-[a-z0-9]+)*)=(\/(\w+\/?)+)$`)
222+
regex := regexp.MustCompile(`^([a-z0-9]+(?:-[a-z0-9]+)*)=(\/([\w]+[\w-]*\/?)+)$`)
223223
for _, volume := range volumeVars {
224224
if regex.MatchString(volume) {
225225
captures := regex.FindStringSubmatch(volume)

0 commit comments

Comments
 (0)