diff --git a/build-packages/magento-scripts/lib/util/open-browser.js b/build-packages/magento-scripts/lib/util/open-browser.js index 83026c0e..4c531ded 100755 --- a/build-packages/magento-scripts/lib/util/open-browser.js +++ b/build-packages/magento-scripts/lib/util/open-browser.js @@ -1,12 +1,14 @@ const { execAsync } = require('./exec-async') +// eslint-disable-next-line no-control-regex +const consoleStyleReplacer = /[\u001b]\[\S+?m/g /** * @param {string} url */ const openBrowser = async (url) => { const start = process.platform === 'darwin' ? 'open' : 'xdg-open' - await execAsync(`${start} ${url}`) + await execAsync(`${start} ${url.replace(consoleStyleReplacer, '')}`) } module.exports = openBrowser