scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
543 stars 182 forks source link

I can’t use jishaku shell command #209

Closed tuna2134 closed 1 year ago

tuna2134 commented 1 year ago

Summary

I can’t use jishaku shell command

Reproduction steps

Use docker image("python:3-alpine”)

Expected results

Run command

Actual results


Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/jishaku/features/shell.py", line 87, in jsk_shell
    with ShellReader(argument.content, escape_ansi=not Flags.use_ansi(ctx)) as reader:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jishaku/shell.py", line 86, in __init__
    self.process = subprocess.Popen(sequence, stdout=subprocess.PIPE, stderr=subprocess.PIPE)  # pylint: disable=consider-using-with
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash'

Checklist

System information

scarletcafe commented 1 year ago

While this falls into a weird documentation hole (I really need to get this consistent eventually), the README mentions that the shell command looks at your SHELL environment variable or otherwise uses /bin/bash. So to fix this, you either need to set SHELL to a suitable shell (such as /bin/sh), or install bash.

tuna2134 commented 1 year ago

I see thanks