Draft: Cross platform support fixes
This MR includes a set of changes to ensure that Detective works properly across Linux and macOS.
Major included changes:
- Switched to
pathlibacross the board instead of using theos.pathmodule (keeps things consistent) - Switched to
prompt_toolkitinstead of Rich for prompting and printing.prompt_toolkitis a bit more uniform cross-platform and also fixes keybinds such as the arrow keys in prompts (normally we'd have to importreadlinefor that, which is a big no-no being GPL) - Fixed some weird SSH quirks that were preventing Ansible from working properly on macOS hosts. Passing through keys with
ssh-agenton macOS is pretty broken, and CloudStrike also tends to interfere a lot. The safer and easier method is just to use the user's.sshdirectory which Ansible mounts in the container anyway. This requires us to launch the EE container using the UID of the user launching the frontend, but it seems to work much better.- Note: this means you no longer have to specify a key path when running the frontend. Instead, you will specify the name of the identity file. For example, a key
/Users/sarah/.ssh/google_compute_enginewould just begoogle_compute_engine. - Second note: this also means things like SSH aliases work, since we have the user's SSH config in the container now.
- Note: this means you no longer have to specify a key path when running the frontend. Instead, you will specify the name of the identity file. For example, a key
Marked as draft since I still need to test on WSL and Linux. NOTE: Ansible doesn't support running from a "regular" Windows host, so we can only support WSL, not Win32/64.