From: Russ Cox Date: Wed, 12 Sep 2012 16:05:34 +0000 (-0400) Subject: cmd/dist: emit \r in env -w output X-Git-Tag: go1.1rc2~2469 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=792518c65618599853e1f9da3c23d4ba7d2cce9f;p=gostls13.git 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 --- 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();