- sudo: cmd_on_my_path: command not found
this is counter-intuitive, but i guess makes sense if i think about it enough - sudo only sees the command name, not the full path, and presumably for security they don't want to respect $PATH
but in the case in which the user has full sudo rights, i don't see how this helps anything. so in my script i've replaced "sudo myCommand" with:
- sudo "$(which myCommand)"
not enough of a guru to know if this is perfect or really safe, so buyer beware. but wanted to post something - doesn't appear to be a good answer available via google