This commit modifies the AuthHelpers class to return a default value when environment variables are not set, enhancing robustness and usability. It updates the getBrowser method to default to "firefox" if the "BROWSER" environment variable is not present. Additionally, the safeGetEnv method is refactored to accept a default value parameter, allowing other methods to specify fallbacks as necessary. An overload of safeGetEnv is also provided to maintain compatibility with existing calls that expect an exception if the environment variable is not defined.
This commit modifies the AuthHelpers class to return a default value when environment variables are not set, enhancing robustness and usability. It updates the getBrowser method to default to "firefox" if the "BROWSER" environment variable is not present. Additionally, the safeGetEnv method is refactored to accept a default value parameter, allowing other methods to specify fallbacks as necessary. An overload of safeGetEnv is also provided to maintain compatibility with existing calls that expect an exception if the environment variable is not defined.