-
Notifications
You must be signed in to change notification settings - Fork 90
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: StartParameters on Windows #146
fix: StartParameters on Windows #146
Conversation
@fergusstrange let me know what you think. |
embedded_postgres.go
Outdated
@@ -200,9 +200,14 @@ func (ep *EmbeddedPostgres) Stop() error { | |||
|
|||
func encodeOptions(port uint32, parameters map[string]string) string { | |||
options := []string{fmt.Sprintf("-p %d", port)} | |||
stringDelimitingChar := "'" | |||
// CMD on Windows uses double quotes to delimit strings. It treats single quotes as regular characters. | |||
if runtime.GOOS == "windows" { |
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.
Why not just move to usign " on all platforms? If you try it do tests still all pass?
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 originally wanted to keep the existing behavior identical on unaffected platforms, but looks like the tests all pass when using ".
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.
Yeah, I reckon this is a better overall improvement though, nice job!
Addresses #145.
Changes: