Skip to content

Conversation

hugodutka
Copy link
Contributor

Addresses #145.

Changes:

  • use the correct string delimiter on Windows

@hugodutka hugodutka changed the title fix: start parameters on windows fix: StartParameters on Windows Dec 6, 2024
@hugodutka hugodutka marked this pull request as ready for review December 6, 2024 17:55
@hugodutka
Copy link
Contributor Author

@fergusstrange let me know what you think.

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" {
Copy link
Owner

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?

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 originally wanted to keep the existing behavior identical on unaffected platforms, but looks like the tests all pass when using ".

Copy link
Owner

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!

@fergusstrange fergusstrange merged commit f5c275b into fergusstrange:master Dec 8, 2024
8 checks passed
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.

2 participants