Skip to content

Try to detect incompatible shell environments that will result in stuck commands

Problem to solve

When executing run_command in the IDE, we will attempt to use an integrated shell / terminal in the IDE. This is great because it provides transparency on what has been run and allows the user to view the full output.

Unfortunately some shell plugins/themese break the integrated shell environment and prevent commands from returning successfully on completion, which results in Duo being hung.

See #2070 (closed) for much discussion and gitlab!206039 (merged) for docs on a workaround.

Proposed solution

If there are some common environments that will cause issues (e.g. powerlevel10k theme seems to be mentioned a lot), perhaps we can find a simple "test" command we can run which results in this stuck situation. Then before we start a workflow, we can execute the test command and see if we get a successful response or not. If we dont get a response back (it times out), we can assume the user has some fancy terminal setup, and opt out of using the integrated IDE terminal for run_command.

While this would not detect all problems in all environments, if we can avoid the issue for most/many users it still feels worthwhile and less intrusive than the proposed env var workaround (which we should probably still offer)

Edited by Elwyn Benson