Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testscript: create a hidden temp directory by default #135

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

myitcv
Copy link
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 rogpeppe and mvdan March 12, 2021 11:15
testscript/testscript.go Outdated Show resolved Hide resolved
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