Skip to content

testscript: create a hidden temp directory by default#135

Merged
myitcv merged 1 commit intomasterfrom
testscript_establish_hidden_tempdir
Mar 12, 2021
Merged

testscript: create a hidden temp directory by default#135
myitcv merged 1 commit intomasterfrom
testscript_establish_hidden_tempdir

Conversation

@myitcv
Copy link
Copy Markdown
Collaborator

@myitcv myitcv commented Mar 12, 2021

When running a testscript, we currently create a temporary directory in
$WORK/tmp. This is problematic because it interacts badly with cmd/go
(which is used by go/packages) trying to resolve the ./... pattern from
$WORK.

Instead establish a temporary directory in workdir, but use a prefix
that ensures this directory will not be walked when resolving the ./...
pattern from workdir.

@myitcv myitcv requested review from mvdan and rogpeppe March 12, 2021 11:15
Comment thread testscript/testscript.go Outdated
When running a testscript, we currently create a temporary directory in
$WORK/tmp. This is problematic because it interacts badly with cmd/go
(which is used by go/packages) trying to resolve the ./... pattern from
$WORK.

Instead establish a temporary directory in workdir, but use a prefix
that ensures this directory will not be walked when resolving the ./...
pattern from workdir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants