]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fail 'go work' subcommands with a more helpful error if no go.work file exists
authorBryan C. Mills <bcmills@google.com>
Tue, 1 Feb 2022 21:59:41 +0000 (16:59 -0500)
committerBryan Mills <bcmills@google.com>
Thu, 3 Feb 2022 05:54:02 +0000 (05:54 +0000)
commitd0a0606841937cd6dd1db7a95ebd9d6e7ad02d96
tree3f1d83080ae023b9e0cf31fc0865c25b124eb3d1
parent54b2a75406a4e347cff2825b698f910549d6bd04
cmd/go: fail 'go work' subcommands with a more helpful error if no go.work file exists

Otherwise, the failure mode for these subcommands refers to an empty file path:
go: open : no such file or directory

Fixes #50964

Change-Id: I8776431a294d2b2246d7d147b6059054f31bc255
Reviewed-on: https://go-review.googlesource.com/c/go/+/382246
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/workcmd/edit.go
src/cmd/go/internal/workcmd/sync.go
src/cmd/go/internal/workcmd/use.go
src/cmd/go/testdata/script/work_nowork.txt [new file with mode: 0644]