better parameters handling - handles quotes as well#1266
Merged
robgjansen merged 5 commits intoshadow:mainfrom Apr 8, 2021
Merged
better parameters handling - handles quotes as well#1266robgjansen merged 5 commits intoshadow:mainfrom
robgjansen merged 5 commits intoshadow:mainfrom
Conversation
robgjansen
requested changes
Apr 6, 2021
Member
robgjansen
left a comment
There was a problem hiding this comment.
This is a great improvement, thanks for the contribution! I'm requesting changes to fix the memory leak.
Member
Seems ok to me.
I would be nice to add something to one of the tests in src/test, but in this case we don't have a good way to test this so I think we can skip it on this one. |
3307f10 to
5ab1cfc
Compare
Contributor
Author
|
quick q - should I switch this PR to dev? or should it stay on main? |
robgjansen
approved these changes
Apr 8, 2021
Member
robgjansen
left a comment
There was a problem hiding this comment.
Looks great! We want to merge to main, which I'll do shortly :) Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #1265
Couple of questions:
rather than manually splitting & parsing, I've used g_shell_parse_argv() here (see https://developer.gnome.org/glib/stable/glib-Shell-related-Utilities.html#g-shell-parse-argv). this will also handle special cases like quoted arguments containing spaces (not not expansions and other special cases, see the referenced docs). do you have any concern?
should I add a test case? I don't see any test cases for process.c, I'm not sure if you want them or not.