Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: prevent go work use panic when given a file
The current implementation fails to identify that an argument to go work use is a file when expecting a directory, and panics when attempting to access it as a directory. This change checks arguments are directories and generates an error otherwise. Fixes #51749 Change-Id: If8f69d233409e93fcf391a8774bace74c031c986 Reviewed-on: https://go-review.googlesource.com/c/go/+/393615 Reviewed-by: Bryan Mills <bcmills@google.com> Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Ian Lance Taylor <iant@golang.org>
- Loading branch information