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

fix vendoring dependencies when building the source tarball #6349

Merged
merged 1 commit into from
May 20, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented May 17, 2019

TMPDIR is a special variable indicating the system temporary directory root. Unfortunately, go refuses to honor go.mod files in this directory to prevent random /tmp/go.mod files from messing with modules cloned into /tmp.

The fix is simple: rename TMPDIR to TEMP.

Note: this is only an issue when TMPDIR is exported (e.g., you're like me and you put your temporary directory somewhere else).

TMPDIR is a special variable indicating the _system_ temporary directory root.
Unfortunately, go refuses to honor `go.mod` files in this directory to prevent
random `/tmp/go.mod` files from messing with modules cloned into `/tmp`.

The fix is simple: rename TMPDIR to TEMP.
@Stebalien Stebalien requested a review from Kubuxu May 17, 2019 19:42
Copy link
Member

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've forgotten that TMPDIR is defined system env variable.

@Stebalien Stebalien merged commit 501001f into master May 20, 2019
@Stebalien Stebalien deleted the fix/mk-source-tarball-tempdir branch May 20, 2019 16:17
@Stebalien Stebalien restored the fix/mk-source-tarball-tempdir branch May 30, 2019 22:35
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