Skip to content

package-pypi fails on windows-11-arm: pushd: $'.\r' #55

@mavam

Description

@mavam

The Regenerate parser step in package-pypi.yml fails on windows-11-arm runners:

pushd: $'.\r': No such file or directory

Cause: CRLF line endings. The jq output or heredoc contains \r, causing bash to interpret .\r as the directory.

Affected code (package-pypi.yml#L68-L72):

while read -r grammar_dir; do
  pushd "$grammar_dir"
  tree-sitter generate
  popd > /dev/null
done < <(jq -r '.grammars[].path // "."' tree-sitter.json)

Example failure: https://github.com/tenzir/tree-sitter-tql/actions/runs/20277765746/job/58231227178

Suggested fix: Strip \r from the directory variable:

grammar_dir="${grammar_dir%$'\r'}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      .\r' · Issue #55 · tree-sitter/workflows · GitHub">
      Skip to content

      package-pypi fails on windows-11-arm: pushd: $'.\r' #55

      @mavam

      Description

      @mavam

      The Regenerate parser step in package-pypi.yml fails on windows-11-arm runners:

      pushd: $'.\r': No such file or directory
      

      Cause: CRLF line endings. The jq output or heredoc contains \r, causing bash to interpret .\r as the directory.

      Affected code (package-pypi.yml#L68-L72):

      while read -r grammar_dir; do
        pushd "$grammar_dir"
        tree-sitter generate
        popd > /dev/null
      done < <(jq -r '.grammars[].path // "."' tree-sitter.json)

      Example failure: https://github.com/tenzir/tree-sitter-tql/actions/runs/20277765746/job/58231227178

      Suggested fix: Strip \r from the directory variable:

      grammar_dir="${grammar_dir%$'\r'}"

      Metadata

      Metadata

      Assignees

      No one assigned

        Labels

        No labels
        No labels

        Type

        No type

        Projects

        No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions