Skip to content

Commit

Permalink
Debugger won't start due to spaces in directory path
Browse files Browse the repository at this point in the history
Summary:
Similar issue to #214. When I attempt to do command + D in the simulator, I get the following issue.

```
Launching Dev Tools...
Failed to run launchChromeDevTools.applescript { [Error: Command failed: /bin/sh -c /Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui
/bin/sh: -c: line 0: syntax error near unexpected token `Personal'
/bin/sh: -c: line 0: `/Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui'
]
  killed: false,
  code: 2,
  signal: null,
  cmd: '/bin/sh -c /Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui' }

/bin/sh: -c: line 0: syntax error near unexpected token `Personal'
/bin/sh: -c: line 0: `/Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packa
Closes #348
Github Author: rickyc <rickyc.us@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
  • Loading branch information
rickyc committed Jun 2, 2015
1 parent 4d4f2df commit 78f83ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packager/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

var fs = require('fs');
var path = require('path');
var exec = require('child_process').exec;
var execFile = require('child_process').execFile;
var http = require('http');

var getFlowTypeCheckMiddleware = require('./getFlowTypeCheckMiddleware');
Expand Down Expand Up @@ -172,7 +172,7 @@ function getDevToolsLauncher(options) {
var debuggerURL = 'http://localhost:' + options.port + '/debugger-ui';
var script = 'launchChromeDevTools.applescript';
console.log('Launching Dev Tools...');
exec(path.join(__dirname, script) + ' ' + debuggerURL, function(err, stdout, stderr) {
execFile(path.join(__dirname, script), [debuggerURL], function(err, stdout, stderr) {
if (err) {
console.log('Failed to run ' + script, err);
}
Expand Down

0 comments on commit 78f83ac

Please sign in to comment.