argv: refactor argv_from_env to return an error state