Is there a workaround to use of bash via adb on LineageOS17?
The error is expected. adb shell by default doesn't allocate a TTY (terminal) which is required for interactive session. Instead use:
adb shell -t bash -i