Turn the 'mode' parameter of environment variables into an enum