diff options
| author | John Anthony <johnanthony.contrib@gmail.com> | 2022-03-17 15:36:52 +0000 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2022-03-31 21:10:26 +0000 |
| commit | a84ef500213ef6c2a0e4bfd82253e9fcd28f1f62 (patch) | |
| tree | 25e4a5b69aa8328cfef1d04c131cb5efb7157094 /src/syscall/exec_linux_test.go | |
| parent | 31ee4bb28dff98f29654e7f1b43488641b3157db (diff) | |
| download | go-a84ef500213ef6c2a0e4bfd82253e9fcd28f1f62.tar.xz | |
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>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
0 files changed, 0 insertions, 0 deletions
