Fixed sudo command ignoring environment variables.