Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch bashlex not implemented errors #155

Open
klieret opened this issue Jan 9, 2025 · 0 comments
Open

Catch bashlex not implemented errors #155

klieret opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@klieret
Copy link
Member

klieret commented Jan 9, 2025

catch things like

  "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/swerex/runtime/local.py", line
            76, in _split_bash_command
                parsed = bashlex.parse(inpt)
                         ^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/parser.py",
            line 610, in parse
                parts = [p.parse()]
                         ^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/parser.py",
            line 691, in parse
                tree = theparser.parse(lexer=self.tok, context=self)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/yacc.py", line
            439, in parse
                p.callable(pslice)
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/parser.py",
            line 167, in p_simple_command_element
                p[0] = [_expandword(parserobj, p.slice[1])]
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/parser.py",
            line 145, in _expandword
                parts, expandedword = subst._expandwordinternal(parser,
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/subst.py", line
            271, in _expandwordinternal
                node, sindex[0] = _paramexpand(parserobj, string, sindex[0])
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/subst.py", line
            165, in _paramexpand
                return _extractcommandsubst(parserobj, string, zindex + 1)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.cache/pipx/7ec35479d91eadd/lib/python3.11/site-packages/bashlex/subst.py", line
            52, in _extractcommandsubst
                raise NotImplementedError('arithmetic expansion')
            NotImplementedError: arithmetic expansion
@klieret klieret added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant