-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
GH952: Refactor DotNetCore args string->ArgumentBuilder #953
Conversation
d85242b
to
4cd7964
Compare
/// Copies all the arhuments of the current <see cref="ProcessArgumentBuilder"/> to target <see cref="ProcessArgumentBuilder"/>. | ||
/// </summary> | ||
/// <param name="target">The copy target.</param> | ||
public void CopyTo(ProcessArgumentBuilder target) |
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.
Maybe it makes more sense exposing the tokens as a IReadOnlyList<IProcessArgument>
and add those two methods as extension methods since they only require read access.
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.
Couldn't that potentially leak sensitive tokens?
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.
Well, the person who got access to the token could just as well use the Render
method, or am I missing something?
6244715
to
7ba346b
Compare
@patriksvensson refactored CopyTo / IsNullOrEmpty to pure extension methods, so think I've addressed your feedback. Also rebased against latest develop. |
@@ -380,5 +380,39 @@ public static ProcessArgumentBuilder AppendQuotedSecret(this ProcessArgumentBuil | |||
} | |||
return builder; | |||
} | |||
|
|||
/// <summary> | |||
/// Indicates whether a <see cref="ProcessArgumentBuilder"/> is null or renders empty. |
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.
Should be indicates
.
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.
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.
Did I just have a stroke? I could have sworn it said indiates
when I read it.
@devlead Left some minor comments. Looks good to me otherwise. |
@patriksvensson think I've addressed your feedback now. |
Merged. Awesome work 👍 |
This is a proposed fix for #952
Currently the DotNetCore DotNetCoreExecute and DotNetCoreRun uses a quoted single string for args, this breaks in some scenarios also wont allow filtering sensitive data.
This PR
CopyTo(ProcessArgumentBuilder target)
method toProcessArgumentBuilder
ProcessArgumentBuilder
to anotherIsEmpty()
method toProcessArgumentBuilder
ProcessArgumentBuilder
has any args / would render empty.