mirror of
https://github.com/mappu/miqt.git
synced 2025-05-07 20:40:22 +00:00
miqt-docker: change wildcard from * to - to avoid shell interpretation
This commit is contained in:
parent
d075984e77
commit
b2536be8d5
@ -18,10 +18,10 @@ import (
|
||||
)
|
||||
|
||||
// glob2regex converts the glob pattern into a regexp.
|
||||
// It only supports `*` as a special character.
|
||||
// It only supports `-` as a special character meaning 'anything'.
|
||||
// The resulting regex is unanchored i.e. can match anywhere within a target string.
|
||||
func glob2regex(pattern string) *regexp.Regexp {
|
||||
parts := strings.Split(pattern, `*`)
|
||||
parts := strings.Split(pattern, `-`)
|
||||
for i, p := range parts {
|
||||
parts[i] = regexp.QuoteMeta(p)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user