Skip to content

Commit 5df3899

Browse files
dbanksdesignQingWei-Li
authored andcommitted
fix: security with open module (#33) (#39)
1 parent 0ca8b83 commit 5df3899

File tree

3 files changed

+8465
-3
lines changed

3 files changed

+8465
-3
lines changed

lib/commands/serve.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const serveStatic = require('serve-static')
44
const connect = require('connect')
55
const livereload = require('connect-livereload')
66
const lrserver = require('livereload')
7-
const open = require('open')
7+
const opn = require('opn')
88
const chalk = require('chalk')
99
const util = require('../util/index')
1010

@@ -34,7 +34,7 @@ module.exports = function (path, openInBrowser, port, livereloadPort) {
3434
}).watch(path)
3535

3636
if (openInBrowser) {
37-
open(`http://localhost:${port}`)
37+
opn(`http://localhost:${port}`)
3838
}
3939

4040
const msg = '\nServing ' + chalk.green(`${path}`) + ' now.\n' +

0 commit comments

Comments
 (0)