Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Docker run options. #7
base: master
Are you sure you want to change the base?
Docker run options. #7
Changes from all commits
11bef70
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is tricky part.
spawn
accepts arguments separated in a list and not in one string. But just to split by space can also be problematic if space is part of the value.I wrote helper function to parse arguments by
-
to an object.https://github.com/tgrospic/rnode-grpc-js/blob/a6ae689/src/cli/args.js#L30
This is how it's used. For now object can be transformed to a list and just appended. Later we can add merging of objects.
https://github.com/tgrospic/rnode-grpc-js/blob/a6ae6894/src/cli/index.js#L60
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.
I'm not sure we can use your function. I have an option like --network=host but your function strips the dashes. I need an array like ['--network', 'host'] not ['network','host']. Am I understanding that you want a modified version of your version to return lists of string arrays with the dashes intact?
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.
Yes, you are right. With equal sign will not work. And also multiple parameters like
-p 123 -p 456
are generated as a list for this key{ p: [123, 456] }
.Maybe there already exists some nice lib for what we need here?
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.
elsewhere in vs-code config, JSON is used to represent structured args.