| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,18 +178,16 @@ function validateHints(hints) { | |||
| 178 | 178 | } | |
| 179 | 179 | ||
| 180 | 180 | let invalidHostnameWarningEmitted = false; | |
| 181 | - | ||
| 182 | 181 | function emitInvalidHostnameWarning(hostname) { | |
| 183 | - if (invalidHostnameWarningEmitted) { | ||
| 184 | - return; | ||
| 182 | + if (!invalidHostnameWarningEmitted) { | ||
| 183 | + process.emitWarning( | ||
| 184 | + `The provided hostname "${hostname}" is not a valid ` + | ||
| 185 | + 'hostname, and is supported in the dns module solely for compatibility.', | ||
| 186 | + 'DeprecationWarning', | ||
| 187 | + 'DEP0118' | ||
| 188 | + ); | ||
| 189 | + invalidHostnameWarningEmitted = true; | ||
| 185 | 190 | } | |
| 186 | - invalidHostnameWarningEmitted = true; | ||
| 187 | - process.emitWarning( | ||
| 188 | - `The provided hostname "${hostname}" is not a valid ` + | ||
| 189 | - 'hostname, and is supported in the dns module solely for compatibility.', | ||
| 190 | - 'DeprecationWarning', | ||
| 191 | - 'DEP0118' | ||
| 192 | - ); | ||
| 193 | 191 | } | |
| 194 | 192 | ||
| 195 | 193 | let dnsOrder = getOptionValue('--dns-result-order') || 'ipv4first'; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments