From 285228713e3b21dc3afee5c1d6c4055de80e1618 Mon Sep 17 00:00:00 2001 From: Walter Leibbrandt Date: Fri, 29 Jul 2022 17:28:38 +0200 Subject: [PATCH] Fix opening with specified browser `open` (unlike `opn`) expects an object of app info. Without this change the value of `options.browser` is effectively ignored, and the default browser is used. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7a5d9ab..c80c801 100644 --- a/index.js +++ b/index.js @@ -368,10 +368,10 @@ LiveServer.start = function (options) { if (openPath !== null) if (typeof openPath === "object") { openPath.forEach(function (p) { - open(openURL + p, { app: browser }); + open(openURL + p, { app: { name: browser } }); }); } else { - open(openURL + openPath, { app: browser }); + open(openURL + openPath, { app: { name: browser } }); } });