and reading manual pages is enough, but this time I'm giving up on this...
And by doing so I have a question:
Do you happens to know how I can include / pull up the .bashrc file while running bash via subprocess?
The actual thing is - my .bashrc / .profile contains many self-made bash functions which I found useful and so use while I'm connected to the my VPS host, but I've tried many cases and none of them won't include bashrc config.
Even if I use --rcfile ~/.bashrc as arg in the subprocessing
————————— fyi how I'm engaging it —————————
await asyncio.create_subprocess_shell(
code,
executable="/bin/bash",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
shell=True,
universal_newlines=False,
)
I think you have to pass your current environment. Not sure how you do it though. Probably already answered on the Internet
Обсуждают сегодня