src: fix deprecation id for non-string env value
This is a follow-up of https://github.com/nodejs/node/pull/18990. A new deprecation id was assigned in it, but it was not reflected in code and test. PR-URL: https://github.com/nodejs/node/pull/19209 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
5826fe4e79
commit
50b1cb39bd
@ -2667,7 +2667,7 @@ static void EnvSetter(Local<Name> property,
|
|||||||
"Assigning any value other than a string, number, or boolean to a "
|
"Assigning any value other than a string, number, or boolean to a "
|
||||||
"process.env property is deprecated. Please make sure to convert the "
|
"process.env property is deprecated. Please make sure to convert the "
|
||||||
"value to a string before setting process.env with it.",
|
"value to a string before setting process.env with it.",
|
||||||
"DEP00XX").IsNothing())
|
"DEP0104").IsNothing())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __POSIX__
|
#ifdef __POSIX__
|
||||||
|
@ -9,7 +9,7 @@ common.expectWarning(
|
|||||||
'Assigning any value other than a string, number, or boolean to a ' +
|
'Assigning any value other than a string, number, or boolean to a ' +
|
||||||
'process.env property is deprecated. Please make sure to convert the value ' +
|
'process.env property is deprecated. Please make sure to convert the value ' +
|
||||||
'to a string before setting process.env with it.',
|
'to a string before setting process.env with it.',
|
||||||
'DEP00XX'
|
'DEP0104'
|
||||||
);
|
);
|
||||||
|
|
||||||
process.env.ABC = undefined;
|
process.env.ABC = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user