Replace getting an env with a macro