Skip to content

cmd/go: for go mod download, -dir option does not exist #27243

Closed
@mpl

Description

@mpl

What version of Go are you using (go version)?

go version go1.11 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOOS="linux"

What did you do?

$ echo $PWD
/home/mpl/src/perkeep.org
$ echo $GOPATH
/home/mpl
$ echo $GO111MODULE
on
$ go mod download -dir github.com/gopherjs/gopherjs
flag provided but not defined: -dir
usage: go mod download [-dir] [-json] [modules]
Run 'go help mod download' for details.

What did you expect to see?

I wanted to see what the -dir option does.
The longer answer is I was trying to find out where go get/download stores the downloaded sources, since I hadn't found it in the documentation. I now see with a more thorough read that it is in GOPATH/pkg/mod

Activity

thepudds

thepudds commented on Aug 26, 2018

@thepudds
Member

@gopherbot please add label modules

agnivade

agnivade commented on Aug 26, 2018

@agnivade
Contributor
agnivade

agnivade commented on Aug 26, 2018

@agnivade
Contributor

Seems like a genuine oversight. There seems to be only the json flag for download. https://github.com/golang/go/blob/master/src/cmd/go/internal/modcmd/download.go#L50.

added
NeedsFixThe path to resolution is known, but the work has not been done.
on Aug 26, 2018
added this to the Go1.12 milestone on Aug 26, 2018
dolmen

dolmen commented on Aug 27, 2018

@dolmen
Contributor

The bug seems in the documentation (go help mod download) that should not mention the inexistent -dir option.

gopherbot

gopherbot commented on Aug 28, 2018

@gopherbot
Contributor

Change https://golang.org/cl/131775 mentions this issue: cmd/go/internal/modcmd: remove non-existant -dir flag

mark-rushakoff

mark-rushakoff commented on Aug 29, 2018

@mark-rushakoff
Contributor

If this is just removing -dir from the output of go help mod download, it would be nice to backport to 1.11.

bcmills

bcmills commented on Sep 4, 2018

@bcmills
Contributor

@gopherbot, please backport to 1.11: this is a doc-only fix.

gopherbot

gopherbot commented on Sep 4, 2018

@gopherbot
Contributor

Backport issue(s) opened: #27498 (for 1.11).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

gopherbot

gopherbot commented on Nov 1, 2018

@gopherbot
Contributor

Change https://golang.org/cl/146717 mentions this issue: [release-branch.go1.11] cmd/go/internal/modcmd: remove non-existent -dir flag

added a commit that references this issue on Nov 30, 2018
locked and limited conversation to collaborators on Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dolmen@mark-rushakoff@mpl@agnivade@bcmills

        Issue actions

          cmd/go: for go mod download, -dir option does not exist · Issue #27243 · golang/go