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

Improper parsing of EXTRA_ARGS instead of passing them on to the application in textual run #38

Open
yggdr opened this issue Oct 8, 2024 · 0 comments

Comments

@yggdr
Copy link

yggdr commented Oct 8, 2024

textual run --help mentions EXTRA_ARGS: Usage: textual run [OPTIONS] FILE or FILE:APP [EXTRA_ARGS].... It does not further describe what those are, but convention suggests them being arguments to the to-be-run application. Meaning textual run should not try to parse those, but simply pass them on the your program.

It does, however, do the opposite:

% textual run --dev tui.py -d -c test

Traceback (most recent call last):
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/bin/textual", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/textual_dev/cli.py", line 225, in _run_app
    exec_command(import_name, args, environment)
  File "/home/yggdrasil/.local/share/hatch/env/virtual/repos/2YYykiyk/repos/lib/python3.11/site-packages/textual_dev/tools/run.py", line 124, in exec_command
    os.execvpe(command, [command, *args], environment)
  File "<frozen os>", line 583, in execvpe
  File "<frozen os>", line 616, in _execvpe
  File "<frozen os>", line 607, in _execvpe
FileNotFoundError: [Errno 2] No such file or directory: b'/bin/tui.py'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant