From 792518c65618599853e1f9da3c23d4ba7d2cce9f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 12 Sep 2012 12:05:34 -0400 Subject: [PATCH] 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 f21b5afda3..9522dffb2b 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -1352,7 +1352,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.48.1