def exec_with_env(ssh, command, msg='<STR_LIT>', env={}, **kwargs):
bash_profile_command = "<STR_LIT>"<EOL>env_command = build_os_environment_string(env)<EOL>new_command = bash_profile_command + env_command + command<EOL>if kwargs.get('<STR_LIT>', True):<EOL><INDENT>return better_exec_command(ssh, new_command, msg)<EOL><DEDENT>else:<EOL><INDENT>return ssh.exec_command(new_command)<EOL><DEDENT>
:param ssh:
:param command:
:param msg:
:param env:
:param synch:
:return: