-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support node 7 and directories with spaces #762
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- 6 | ||
- node | ||
cache: | ||
directories: | ||
- node_modules | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import path from 'path'; | |
import test from 'ava'; | ||
import helpers from 'yeoman-test'; | ||
import { defaultOptions } from 'react-server-cli'; | ||
import shellescape from 'shell-escape'; | ||
|
||
test('generator-react-server:app creates default files', async t => { | ||
let testDir; | ||
|
@@ -129,7 +130,7 @@ function installDeps() { | |
} else { | ||
const localDeps = ['react-server-cli', 'react-server'] | ||
.map(dep => path.resolve(path.join(__dirname, '../..', dep))); | ||
cp.exec('npm install ' + localDeps.join(' '), (error) => { | ||
cp.exec(shellescape(['npm', 'install'].concat(localDeps)), (error) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, is there a deps that needs escaping, or is this defensive in case we add one? I think the change is good either way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when the current path has spaces in it, it screws up the
What should happen instead is something like this:
Same thing would happen if there were a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoa, nice extra fix here! |
||
if (error) { | ||
reject(error); | ||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
"prepublish": "gulp build", | ||
"start": "react-server start", | ||
"test": "gulp test", | ||
"debug": "node-debug --debug-brk=0 -p 9000 react-server start", | ||
"clean": "rimraf npm-debug.log* __clientTemp target" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure we want to keep the debug target for test pages -- it's purpose is a place to repro and debug issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually suggested on slack that we just drop it for now and re-add with Didn't want to put that on @drewpc for this PR, since getting node 7 working is already tangential to what he's actually trying to do. 😆 |
||
}, | ||
"author": "Bo Borgerson", | ||
|
@@ -30,7 +29,6 @@ | |
"eslint": "^3.8.1", | ||
"gulp": "^3.9.1", | ||
"gulp-eslint": "^3.0.1", | ||
"node-inspector": "^0.12.8", | ||
"rimraf": "^2.5.4", | ||
"gulp-nsp": "^2.4.2" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the indentation is off here