Add support to keep environment
Resolve path to command