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

Implement command line args for script/program. #119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NogsMPLS
Copy link

should fix #100

@NogsMPLS
Copy link
Author

I'll get a README update commit later today to show how to use new config option. Just wanted to get this in in case someone see's something wrong with my approach.

@NogsMPLS
Copy link
Author

Let me know if you like the api/approach.

@coreybutler
Copy link
Owner

At first glance, this looks good. I'll test it out this weekend. Thanks!

@@ -135,8 +137,13 @@ var launch = function(){

// Fork the child process
var opts = {env:process.env};
var args;
if (argv.args) {
args = argv.args.split(' ');
Copy link

Choose a reason for hiding this comment

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

This call to split seems a bit dangerous. Should quoted arguments with space characters (such as '1 2 "3 4"') be handled differently?

@scpeterson
Copy link

Hello: I am curious to know the status of this task. We would like to run a Node file as service but the js file takes arguments.

@jdziat
Copy link
Collaborator

jdziat commented Mar 22, 2018

I would say to create a wrapper with the specific arguments in it to avoid having any sort of xml encoding hiccups. Or possibly by using environment variables instead.

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.

command line arguments
5 participants