Skip to content

cmd/go: go build -o /dev/null a.go creates the file "a" #25579

@ianlancetaylor

Description

@ianlancetaylor

On current tip (1ba26a3).

Running go build -o /dev/null hello.go creates the executable hello. go build -o x hello.go works as expected.

> rm ./hello
rm: cannot remove './hello': No such file or directory
> go build -o x ~/hello.go
> ls -l x hello
ls: cannot access 'hello': No such file or directory
-rwxr-x--- 1 iant primarygroup 2651894 May 25 13:58 x*
> rm ./x
> go build -o /dev/null ~/hello.go
> ls -l hello
-rwxr-x--- 1 iant primarygroup 2651894 May 25 13:58 hello*

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions