nektos/act · error

Invalid glob option %s, available option: '--follow-symbolic

Error message

Invalid glob option %s, available option: '--follow-symbolic-links'

What it means

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.

Source

Thrown at pkg/runner/expression.go:189

	hashFiles := func(v []reflect.Value) (interface{}, error) {
		if rc.JobContainer != nil {
			timeed, cancel := context.WithTimeout(ctx, time.Minute)
			defer cancel()
			name := "workflow/hashfiles/index.js"
			hout := &bytes.Buffer{}
			herr := &bytes.Buffer{}
			patterns := []string{}
			followSymlink := false

			for i, p := range v {
				s := p.String()
				if i == 0 {
					if strings.HasPrefix(s, "--") {
						if strings.EqualFold(s, "--follow-symbolic-links") {
							followSymlink = true
							continue
						}
						return "", fmt.Errorf("Invalid glob option %s, available option: '--follow-symbolic-links'", s)
					}
				}
				patterns = append(patterns, s)
			}
			env := map[string]string{}
			for k, v := range rc.Env {
				env[k] = v
			}
			env["patterns"] = strings.Join(patterns, "\n")
			if followSymlink {
				env["followSymbolicLinks"] = "true"
			}

			stdout, stderr := rc.JobContainer.ReplaceLogWriter(hout, herr)
			_ = rc.JobContainer.Copy(rc.JobContainer.GetActPath(), &container.FileEntry{
				Name: name,
				Mode: 0o644,
				Body: hashfiles,

View on GitHub (pinned to 4f41128141)

Solutions

  1. Remove unsupported flags; only '--follow-symbolic-links' is allowed, and only as the first argument.
  2. Check spelling: it is '--follow-symbolic-links', not '--follow-symlinks'.
  3. If the '--' string is genuinely a file pattern, prefix a path segment (e.g. './--file') so it does not start with '--'.

Example fix

# before (workflow)
- run: echo ${{ hashFiles('--follow-symlinks', '**/go.sum') }}

# after
- run: echo ${{ hashFiles('--follow-symbolic-links', '**/go.sum') }}
Defensive patterns

Strategy: validation

Validate before calling

# reject unsupported glob flags in workflow expressions before running
grep -nE "hashFiles\(\s*'--" .github/workflows/*.yml | grep -v "--follow-symbolic-links" && echo 'unsupported glob flag found' || echo 'glob flags ok'

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of nektos/act@4f41128141 (2026-08-15). Data as JSON: /api/errors/f63cd939b119799a. Report an issue: GitHub.