Skip to content

Commit ede7da2

Browse files
committed
fix: add a timeout, avoid process hanging
fixes vuejs#5310
1 parent c8e6450 commit ede7da2

File tree

1 file changed

+2
-1
lines changed
  • packages/@vue/cli-shared-utils/lib

1 file changed

+2
-1
lines changed

packages/@vue/cli-shared-utils/lib/env.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ let hasCheckedBrowsers = false
156156
function tryRun (cmd) {
157157
try {
158158
return execSync(cmd, {
159-
stdio: [0, 'pipe', 'ignore']
159+
stdio: [0, 'pipe', 'ignore'],
160+
timeout: 10000
160161
}).toString().trim()
161162
} catch (e) {
162163
return ''

0 commit comments

Comments
 (0)