-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
Description
Steps to reproduce the issue:
./bin/docker-compose version -f jsonDescribe 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.
nocive
Metadata
Metadata
Assignees
Labels
No labels