@@ -220,8 +220,9 @@ export class CommandLineChoiceParameter extends CommandLineParameter {
220220 const environmentValue : string | undefined = process . env [ this . environmentVariable ] ;
221221 if ( environmentValue !== undefined && environmentValue !== '' ) {
222222 if ( this . alternatives . indexOf ( environmentValue ) < 0 ) {
223- throw new Error ( `Invalid value for the environment variable ${ this . environmentVariable } . Valid choices are: "`
224- + this . alternatives . join ( '", "' ) ) + '"' ;
223+ const choices : string = '"' + this . alternatives . join ( '", "' ) + '"' ;
224+ throw new Error ( `Invalid value "${ environmentValue } " for the environment variable`
225+ + ` ${ this . environmentVariable } . Valid choices are: ${ choices } ` ) ;
225226 }
226227 this . _value = environmentValue ;
227228 return ;
@@ -284,8 +285,8 @@ export class CommandLineFlagParameter extends CommandLineParameter {
284285 const environmentValue : string | undefined = process . env [ this . environmentVariable ] ;
285286 if ( environmentValue !== undefined && environmentValue !== '' ) {
286287 if ( environmentValue !== '0' && environmentValue !== '1' ) {
287- throw new Error ( `Invalid value for the environment variable ${ this . environmentVariable } . `
288- + ` Valid choices are 0 or 1.` ) ;
288+ throw new Error ( `Invalid value " ${ environmentValue } " for the environment variable`
289+ + ` ${ this . environmentVariable } . Valid choices are 0 or 1.` ) ;
289290 }
290291 this . _value = environmentValue === '1' ;
291292 return ;
@@ -349,8 +350,8 @@ export class CommandLineIntegerParameter extends CommandLineParameterWithArgumen
349350 if ( environmentValue !== undefined && environmentValue !== '' ) {
350351 const parsed : number = parseInt ( environmentValue , 10 ) ;
351352 if ( isNaN ( parsed ) || environmentValue . indexOf ( '.' ) >= 0 ) {
352- throw new Error ( `Invalid value for the environment variable ${ this . environmentVariable } . `
353- + ' It must be an integer value.' ) ;
353+ throw new Error ( `Invalid value " ${ environmentValue } " for the environment variable`
354+ + ` ${ this . environmentVariable } . It must be an integer value.` ) ;
354355 }
355356 this . _value = parsed ;
356357 return ;
0 commit comments