mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Allow hyphen in "id" (based on cwd pathname)
A directory with a hyphen currently generates an InvalidId error because of the regex in libcontainer. I don't believe there is any reason a hyphen should be disallowed. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
This commit is contained in:
@@ -26,7 +26,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
idRegex = regexp.MustCompile(`^[\w_]+$`)
|
||||
idRegex = regexp.MustCompile(`^[\w_-]+$`)
|
||||
maxIdLen = 1024
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user