Skip to content

Commit 421ab3c

Browse files
haramjrichardlau
authored andcommitted
util: use getOptionValue('--no-deprecation') in deprecated()
PR-URL: #59760 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 25801b9 commit 421ab3c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/util.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ function deprecate(fn, msg, code, useEmitSync, modifyPrototype = true) {
171171
);
172172

173173
function deprecated(...args) {
174-
// TODO(joyeecheung): use getOptionValue('--no-deprecation') instead.
175-
if (!process.noDeprecation) {
174+
if (!getOptionValue('--no-deprecation') && !process.noDeprecation) {
176175
emitDeprecationWarning();
177176
}
178177
if (new.target) {

0 commit comments

Comments
 (0)