Description
Steps to reproduce the issue:
./bin/docker-compose version -f json
Describe the results you received:
{"version":"v2.3.0-2-gfcff3963"}\n
The newline character was not escaped properly
Describe the results you expected:
{"version":"v2.3.0-2-gfcff3963"}
With a newline.
Additional information you deem important (e.g. issue happens only occasionally):
The json format is printed with:
fmt.Printf(`{"version":%q}\n`, internal.Version)
I think we should either use double-quotes and escape the inner quotes, instead of backticks because the newline is not escaped properly.
fmt.Printf("{\"version\":%q}\n", internal.Version)
Or add a newline character after the closing curly bracket like:
fmt.Printf(`{"version":%q}
`, internal.Version)
I think the better option would be the first.
Description
Steps to reproduce the issue:
Describe the results you received:
{"version":"v2.3.0-2-gfcff3963"}\nThe newline character was not escaped properly
Describe the results you expected:
{"version":"v2.3.0-2-gfcff3963"}With a newline.
Additional information you deem important (e.g. issue happens only occasionally):
The json format is printed with:
I think we should either use double-quotes and escape the inner quotes, instead of backticks because the newline is not escaped properly.
Or add a newline character after the closing curly bracket like:
I think the better option would be the first.