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:
Sakthipriyan Vairamani (thefourtheye) 2018-03-08 00:42:41 +05:30 committed by Timothy Gu
parent 5826fe4e79
commit 50b1cb39bd
No known key found for this signature in database
GPG Key ID: 7FE6B095B582B0D4
2 changed files with 2 additions and 2 deletions

View File

@ -2667,7 +2667,7 @@ static void EnvSetter(Local<Name> property,
"Assigning any value other than a string, number, or boolean to a "
"process.env property is deprecated. Please make sure to convert the "
"value to a string before setting process.env with it.",
"DEP00XX").IsNothing())
"DEP0104").IsNothing())
return;
}
#ifdef __POSIX__

View File

@ -9,7 +9,7 @@ common.expectWarning(
'Assigning any value other than a string, number, or boolean to a ' +
'process.env property is deprecated. Please make sure to convert the value ' +
'to a string before setting process.env with it.',
'DEP00XX'
'DEP0104'
);
process.env.ABC = undefined;