Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

run go mod tidy between tool installations #2877

Merged
merged 6 commits into from
Nov 6, 2019
Merged

run go mod tidy between tool installations #2877

merged 6 commits into from
Nov 6, 2019

Conversation

stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 31, 2019

This prevents modifications to the go.mod file from affecting other tool installations.

const callback = (err: Error, stdout: string, stderr: string) => {
// Make sure to run `go mod tidy` between tool installations.
// This avoids us having to create a fresh go.mod file for each tool.
cp.execFileSync(goRuntimePath, ['mod', 'tidy'], opts);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we do this only if modulesOff is false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ramya-rao-a ramya-rao-a merged commit 077e928 into microsoft:master Nov 6, 2019
@stamblerre stamblerre deleted the modtidy branch November 12, 2019 19:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants