Skip to content

Commit 3273143

Browse files
haramjtargos
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 39befdd commit 3273143

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
@@ -182,8 +182,7 @@ function deprecate(fn, msg, code, useEmitSync, modifyPrototype = true) {
182182
);
183183

184184
function deprecated(...args) {
185-
// TODO(joyeecheung): use getOptionValue('--no-deprecation') instead.
186-
if (!process.noDeprecation) {
185+
if (!getOptionValue('--no-deprecation') && !process.noDeprecation) {
187186
emitDeprecationWarning();
188187
}
189188
if (new.target) {

0 commit comments

Comments
 (0)