Skip to content
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

Merged
merged 2 commits into from
Jun 1, 2016

Conversation

natemcmaster
Copy link
Contributor

cc @lajones @bricelam

This also fixes out we treat verbose output and stderr.

Escapes all parameters passed to dotnet-ef with single quotes.

}
throw $verboseOutput
throw $stderr
Copy link
Contributor

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?

Copy link
Contributor Author

@natemcmaster natemcmaster Jun 1, 2016

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...

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@lajones
Copy link
Contributor

lajones commented Jun 1, 2016

:shipit:

@natemcmaster natemcmaster merged commit aaae665 into dotnet:dev Jun 1, 2016
@natemcmaster natemcmaster deleted the ps-escape branch June 1, 2016 22:50
natemcmaster pushed a commit to dotnet/EntityFramework.Docs that referenced this pull request Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants