fohrloop / wakepy

Cross-platform keep-awake with python
MIT License
195 stars 14 forks source link

invoke test is broken on Windows #394

Closed fohrloop closed 2 months ago

fohrloop commented 2 months ago

With the latest main, inv test command is broken, giving

  File "C:\cases\wakepy\tasks.py", line 58, in run_with_print
    shell=get_shell(),
  File "C:\cases\wakepy\tasks.py", line 115, in get_shell
    raise RuntimeError("Could not find a shell to be be used with invoke!")
RuntimeError: Could not find a shell to be be used with invoke!

The get_shell() logic is currently:

def get_shell():
    bash = "/bin/bash"
    usr_bash = "/usr/local/bin/bash"
    if Path(bash).exists():
        return bash
    elif Path(usr_bash).exists():
        return usr_bash
    raise RuntimeError("Could not find a shell to be be used with invoke!")