Repository navigation
Conversation
argStringToArray dropped "" (so `ssh-keygen -N "" -f key` ran as `ssh-keygen -N -f key`) and trimmed whitespace that was inside quotes in the last argument. Keep an argument once it has a quote, and only trim the last argument when it has no quotes. Fixes actions#2569
Author
|
Friendly ping when you have time. Is there anything you'd like changed here? |
This branch has not been deployed
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.
Fixes #2569.
When
exec.exec/exec.getExecOutputget the command and its arguments in onecommandLinestring,argStringToArray:ssh-keygen -N "" -f keyran asssh-keygen -N -f key, so-fbecame the value of-N-m "fix typo "gavefix typo, while the same argument in the middle kept its spaceNow an argument is kept once it has a quote, even if it is empty, and the last argument is only trimmed when it has no quotes. An unquoted last argument is still trimmed as before (for example a trailing newline in
cmd arg\n), so that behavior does not change.Tests: new
argStringToArrayunit tests for normal splitting,""(alone, in the middle, twice), whitespace inside quotes at the end, and the unquoted trim. The""and trailing-space cases fail onmain.jest packages/exec packages/io --testTimeout 70000passes (86), and eslint and prettier are clean.