From ec783af29cc2468fa190c52e3833d492d56ab85a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 22 Sep 2012 05:55:09 +1000 Subject: [PATCH] [release-branch.go1] cmd/dist: emit \r in env -w output MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport 108165c03c70 cmd/dist: emit \r in env -w output go tool dist env -w is supposed to print a Windows batch file. Normally Windows will execute batch files without \r before \n, but issue 3060 reports that if the file ends up containing paths written in Chinese, Windows 7 cannot execute it without the \r. So add the \r. Fixes #3060. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6498120 »»» --- src/cmd/dist/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index 7f9aa7bcd2..119c458471 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -1301,7 +1301,7 @@ cmdenv(int argc, char **argv) vflag++; break; case 'w': - format = "set %s=%s\n"; + format = "set %s=%s\r\n"; break; default: usage(); -- 2.50.0