Skip to content

cmd/go: -n flag shows Bash commands on all platforms. #5274

@gopherbot

Description

@gopherbot

by toqueteos:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
go clean/build/get -n package

What is the expected output?
"del /F" instead of "rm -f"
"mkdir" instead of "mkdir -p" (if extensions allowed, if not mkdir +
cd madness)
"copy" instead of "cp"

What do you see instead?
D:\>go clean -n github.com/toqueteos/webbrowser
cd ...\go\src\github.com\toqueteos\webbrowser
rm -f webbrowser webbrowser.exe webbrowser.test webbrowser.test.exe

D:\>go get -n github.com/toqueteos/webbrowser

#
# os/exec
#

mkdir -p $WORK\os\exec\_obj\
cd C:\go\src\pkg\os\exec
C:\go\pkg\tool\windows_amd64\6g.exe -o $WORK\os\exec\_obj\_go_.6 -p os/exec -D
_/C_/go/src/pkg/os/exec -I $WORK .\exec.go .\lp_windows.go
C:\go\pkg\tool\windows_amd64\pack.exe grcP $WORK $WORK\os\exec.a
$WORK\os\exec\_obj\_go_.6
mkdir -p C:\go\pkg\windows_amd64\os\
cp $WORK\os\exec.a C:\go\pkg\windows_amd64\os\exec.a

#
# github.com/toqueteos/webbrowser
#

mkdir -p $WORK\github.com\toqueteos\webbrowser\_obj\
cd ...\go\src\github.com\toqueteos\webbrowser
C:\go\pkg\tool\windows_amd64\6g.exe -o $WORK\github.com\toqueteos\webbrowser\_obj\_go_.6
-p github.com/toqueteos/webbrowser -D
_/D_/Carlos/Dropbox/code/go/src/github.com/toqueteos/webbrowser -I $WORK .\doc.go
.\webbrowser.go
C:\go\pkg\tool\windows_amd64\pack.exe grcP $WORK $WORK\github.com\toqueteos\webbrowser.a
$WORK\github.com\toqueteos\webbrowser\_obj\_go_.6
mkdir -p ...\go\pkg\windows_amd64\github.com\toqueteos\
cp $WORK\github.com\toqueteos\webbrowser.a
...\go\pkg\windows_amd64\github.com\toqueteos\webbrowser.a


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Windows 7 Enterprise x64

Which version are you using?  (run 'go version')
go version go1.0.3

---

Elided user related paths with "...".

Quick fixes possible:
- String replace operation.
- A note on top of output for Windows users.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions