subprocess.run(['bash', '-c', '-i', 'alias'], capture_output=True)
in a try catch block with
{subprocess.run(["alias"], capture_output=True).stdout.decode("utf-8")}
Traceback (most recent call last):
File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/site-packages/copilot/copilot.py", line 44, in main
{subprocess.run(["alias"], capture_output=True).stdout.decode("utf-8")}
File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'alias'
Suggestion:
subprocess.run(['bash', '-c', '-i', 'alias'], capture_output=True)
in a try catch block with{subprocess.run(["alias"], capture_output=True).stdout.decode("utf-8")}
Traceback (most recent call last):
File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/site-packages/copilot/copilot.py", line 44, in main {subprocess.run(["alias"], capture_output=True).stdout.decode("utf-8")} File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/home/mano/anaconda3/envs/cpenv/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'alias'