-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix #5376 - escape parameters passed to dotnet-ef from PMC #5618
Conversation
} | ||
throw $verboseOutput | ||
throw $stderr |
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.
What happens if there is no stderr? I.e. does this need if ($stderr) { ... }
around it?
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.
See line above. I could remove -and $stdout
from the predicate because that is always true...
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.
Let me put it another way - what happens if both stderr and stdout are empty? Does the call at line 704 error?
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 suppose it would, but I do not know of any case when a call to dotnet returns with a non-zero exit code an has no output on either stderr or stdout
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.
OK. I'd rather issue an error message in that scenario, but that's not the main point of this fix.
cc @lajones @bricelam
This also fixes out we treat verbose output and stderr.
Escapes all parameters passed to dotnet-ef with single quotes.