Do not attempt to DNS resolve localhost Fixes #4290
| @@ -4,7 +4,7 @@ import yargs from 'yargs/yargs'; | ||
| 4 | 4 | import { hideBin } from 'yargs/helpers'; |
| 5 | 5 | import ipRegex from 'ip-regex'; |
| 6 | 6 | import envPaths from 'env-paths'; |
| 7 | 7 | import { canResolve, color, getConfigValue, stringToBool } from './util.js'; |
| 8 | 8 | import { initConfig } from './config-init.js'; |
| 9 | 9 | |
| 10 | 10 | /** |
| @@ -314,10 +314,8 @@ export class CommandLineParser { | ||
| 314 | 314 | }, |
| 315 | 315 | getBrowserLaunchHostname: async function ({ useIPv6, useIPv4 }) { |
| 316 | 316 | if (this.browserLaunchHostname === 'auto') { |
| 317 | - const localhostResolve = await canResolve('localhost', useIPv6, useIPv4); | |
| 318 | - | |
| 319 | 317 | if (useIPv6 && useIPv4) { |
| 320 | 318 | return (this.browserLaunchAvoidLocalhost || !localhostResolve) ? '[::1]' : 'localhost'; |
| 321 | 319 | } |
| 322 | 320 | |
| 323 | 321 | if (useIPv6) { |