{"record":{"id":"f63cd939b119799a","repo":"nektos/act","slug":"invalid-glob-option-s-available-option-follo","errorCode":null,"errorMessage":"Invalid glob option %s, available option: '--follow-symbolic-links'","messagePattern":"Invalid glob option (.+?), available option: '--follow-symbolic-links'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/expression.go","lineNumber":189,"sourceCode":"\thashFiles := func(v []reflect.Value) (interface{}, error) {\n\t\tif rc.JobContainer != nil {\n\t\t\ttimeed, cancel := context.WithTimeout(ctx, time.Minute)\n\t\t\tdefer cancel()\n\t\t\tname := \"workflow/hashfiles/index.js\"\n\t\t\thout := &bytes.Buffer{}\n\t\t\therr := &bytes.Buffer{}\n\t\t\tpatterns := []string{}\n\t\t\tfollowSymlink := false\n\n\t\t\tfor i, p := range v {\n\t\t\t\ts := p.String()\n\t\t\t\tif i == 0 {\n\t\t\t\t\tif strings.HasPrefix(s, \"--\") {\n\t\t\t\t\t\tif strings.EqualFold(s, \"--follow-symbolic-links\") {\n\t\t\t\t\t\t\tfollowSymlink = true\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"\", fmt.Errorf(\"Invalid glob option %s, available option: '--follow-symbolic-links'\", s)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpatterns = append(patterns, s)\n\t\t\t}\n\t\t\tenv := map[string]string{}\n\t\t\tfor k, v := range rc.Env {\n\t\t\t\tenv[k] = v\n\t\t\t}\n\t\t\tenv[\"patterns\"] = strings.Join(patterns, \"\\n\")\n\t\t\tif followSymlink {\n\t\t\t\tenv[\"followSymbolicLinks\"] = \"true\"\n\t\t\t}\n\n\t\t\tstdout, stderr := rc.JobContainer.ReplaceLogWriter(hout, herr)\n\t\t\t_ = rc.JobContainer.Copy(rc.JobContainer.GetActPath(), &container.FileEntry{\n\t\t\t\tName: name,\n\t\t\t\tMode: 0o644,\n\t\t\t\tBody: hashfiles,","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/expression.go#L171-L207","documentation":"Implements the GitHub Actions getFilesByPattern / glob-based hashFiles()... specifically the expression evaluator's glob function (pkg/runner/expression.go). The first argument to the pattern list may be the flag '--follow-symbolic-links'; any other string starting with '--' is rejected with this error, because the internal glob helper (github/actions/glob) only supports that single option.","triggerScenarios":"A workflow expression like ${{ hashFiles('--foo', 'src/**') }} or a pattern string accidentally starting with '--' as the FIRST argument (only position 0 is checked as a flag). Later arguments starting with '--' are treated as patterns and passed through.","commonSituations":"Porting a shell command ('git ls-files --others') into hashFiles unchanged; typos like '--follow-symlinks' (missing 'bolic-l'); passing an option after the first pattern where it is silently treated as a pattern instead.","solutions":["Remove unsupported flags; only '--follow-symbolic-links' is allowed, and only as the first argument.","Check spelling: it is '--follow-symbolic-links', not '--follow-symlinks'.","If the '--' string is genuinely a file pattern, prefix a path segment (e.g. './--file') so it does not start with '--'."],"exampleFix":"# before (workflow)\n- run: echo ${{ hashFiles('--follow-symlinks', '**/go.sum') }}\n\n# after\n- run: echo ${{ hashFiles('--follow-symbolic-links', '**/go.sum') }}","handlingStrategy":"validation","validationCode":"# reject unsupported glob flags in workflow expressions before running\ngrep -nE \"hashFiles\\(\\s*'--\" .github/workflows/*.yml | grep -v \"--follow-symbolic-links\" && echo 'unsupported glob flag found' || echo 'glob flags ok'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember only '--follow-symbolic-links' exists, and only as the first hashFiles argument.","Do not paste shell flags into hashFiles().","Prefix literal '--' patterns with './'."],"tags":["expression","hashfiles","glob","workflow"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}