* Initialize a parameter from the command line or process environment * * * This method looks for the parameter from the command line in the format * --PARAMETER=VALUE, then from the process environment, then from the * default specified as an argument. * * *
(paramName, defaultValue)
| 870 | * @return {T} The found value, or default value |
| 871 | */ |
| 872 | initParam(paramName, defaultValue) { |
| 873 | // Record and return the value |
| 874 | const value = this.getCmdLineArg(paramName) || process.env[paramName] || defaultValue; |
| 875 | this.setEnv(paramName, value); |
| 876 | |
| 877 | return value; |
| 878 | } |
| 879 | |
| 880 | /** |
| 881 | * <p>Get Command Line Arguments</p> |
no test coverage detected