Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: work use silently ignores nonexistent target #51965

Open
ansidev opened this issue Mar 26, 2022 · 1 comment
Open

cmd/go: work use silently ignores nonexistent target #51965

ansidev opened this issue Mar 26, 2022 · 1 comment
Labels
GoCommand NeedsInvestigation

Comments

@ansidev
Copy link

@ansidev ansidev commented Mar 26, 2022

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

go version go1.18 darwin/amd64

Does this issue reproduce with the latest release?

  • Yes

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

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="{secret}"
GOENV="{secret}"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="{secret}"
GONOPROXY="{secret}"
GONOSUMDB="{secret}"
GOOS="darwin"
GOPATH="/Users/mac/go"
GOPRIVATE="{secret}"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.18/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK="{secret}"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rg/2ghbpv594593xwc66z446w5w0000gn/T/go-build2275001121=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Run the following commands:

(Format: $ {current_dir} > {command})
$ go > mkdir workspace
$ go > cd workspace
$ workspace > go work init
$ workspace > ls -la
total 8
-rw-r--r-- 1 user staff 8B Mar 26 17:51 go.work
$ workspace > go work use ./lib

What did you expect to see?

Error, because the folder ./lib does not exist.

What did you see instead?

Empty output.

@seankhliao seankhliao changed the title cmd/go: unexpected output while running go workspace command cmd/go: work use silently ignores nonexistent target Mar 28, 2022
@seankhliao seankhliao added NeedsInvestigation GoCommand labels Mar 28, 2022
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Mar 28, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

2 participants