1
0
mirror of https://github.com/golang/go synced 2024-11-26 00:07:57 -07:00

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
This commit is contained in:
Russ Cox 2012-09-12 12:05:34 -04:00
parent 1b4e37a43c
commit 792518c656

View File

@ -1352,7 +1352,7 @@ cmdenv(int argc, char **argv)
vflag++; vflag++;
break; break;
case 'w': case 'w':
format = "set %s=%s\n"; format = "set %s=%s\r\n";
break; break;
default: default:
usage(); usage();