mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 11:51:41 +03:00
fix(redux-devtools-cli): forward port to spawned electron (#564)
This commit is contained in:
parent
d312ca2057
commit
a1c2f068b5
|
@ -5,7 +5,11 @@ var spawn = require('cross-spawn');
|
||||||
function open(app, options) {
|
function open(app, options) {
|
||||||
if (app === true || app === 'electron') {
|
if (app === true || app === 'electron') {
|
||||||
try {
|
try {
|
||||||
spawn.sync(require('electron'), [path.join(__dirname, '..', 'app')]);
|
var port = options.port ? '--port=' + options.port : '';
|
||||||
|
spawn.sync(require('electron'), [
|
||||||
|
path.join(__dirname, '..', 'app'),
|
||||||
|
port
|
||||||
|
]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
if (error.message === "Cannot find module 'electron'") {
|
if (error.message === "Cannot find module 'electron'") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user