! go work use foo bar baz

stderr '^go: '$WORK'[/\\]gopath[/\\]src[/\\]foo is not a directory'
stderr '^go: directory '$WORK'[/\\]gopath[/\\]src[/\\]baz does not exist'
cmp go.work go.work_want

! go work use -r qux
stderr '^go: '$WORK'[/\\]gopath[/\\]src[/\\]qux is not a directory'

-- go.work --
go 1.18
-- go.work_want --
go 1.18
-- foo --
-- qux --
-- bar/go.mod --
module bar