Skip to content
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

test: fork child node processes #1151

Merged
merged 3 commits into from
Dec 12, 2017
Merged

test: fork child node processes #1151

merged 3 commits into from
Dec 12, 2017

Conversation

heisian
Copy link
Contributor

@heisian heisian commented Dec 6, 2017

it blends

@@ -9,7 +9,7 @@ node_js:
- '8'
- '6'
before_install:
- if [ "$TRAVIS_BRANCH" == "master" ]; then echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then export _authToken=$NPM_TOKEN; fi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remy had to do this to get it to build

@heisian heisian changed the title test: fork child node processes. test: fork child node processes Dec 6, 2017
@heisian
Copy link
Contributor Author

heisian commented Dec 6, 2017

booyakashah!

@remy
Copy link
Owner

remy commented Dec 7, 2017 via email

@lzl124631x
Copy link

Cool. Looking forward to merging it!

@remy
Copy link
Owner

remy commented Dec 12, 2017

I'm just waiting on another PR to be finished and I'll merge this in.

@remy
Copy link
Owner

remy commented Dec 12, 2017

Can you merge this commit into your branch? It should fix the npm install problem properly now and will allow me to merge without having to edit your code.

@remy remy merged commit cf923a8 into remy:master Dec 12, 2017
@remy
Copy link
Owner

remy commented Dec 13, 2017

Damn, just hit the first issue that says using fork is a problem.

Try running nodemon --inspect app.js (app.js can be just a console.log). Because node isn't spawned, it doesn't open the debugger. Not sure if this is possible with fork?

@@ -82,7 +83,17 @@ function run(options) {
});
}

child = spawn.apply(null, spawnArgs);
if (executable === 'node') {
var forkArgs = cmd.args.slice(1);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest - why is this .slice(1)?

@@ -82,7 +83,17 @@ function run(options) {
});
}

child = spawn.apply(null, spawnArgs);
if (executable === 'node') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also adding cmd.args[0].indexOf('-') === -1 && to this line so that spawns if there's a node argument being passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants