(token string)
| 940 | } |
| 941 | |
| 942 | func expandLocalPatternToken(token string) ([]string, error) { |
| 943 | if !hasWildcard(token) { |
| 944 | return []string{token}, nil |
| 945 | } |
| 946 | |
| 947 | pattern := utils.ExpandLocalPath(token) |
| 948 | matches, err := filepath.Glob(pattern) |
| 949 | if err != nil { |
| 950 | return nil, fmt.Errorf("shell: invalid wildcard pattern %s: %w", token, err) |
| 951 | } |
| 952 | if len(matches) == 0 { |
| 953 | return nil, fmt.Errorf("shell: no matches found for %s", token) |
| 954 | } |
| 955 | return matches, nil |
| 956 | } |
| 957 | |
| 958 | func consumesNextValue(token string) bool { |
| 959 | switch token { |
no test coverage detected