diff --git a/go.work b/go.work index 5bf34234031225..d77cbb12e6c135 100644 --- a/go.work +++ b/go.work @@ -126,4 +126,5 @@ use ( test/fakeintake test/new-e2e test/otel + tools/retry_file_dump ) diff --git a/tasks/modules.py b/tasks/modules.py index 90524ef1560a3e..09192a074973a0 100644 --- a/tasks/modules.py +++ b/tasks/modules.py @@ -81,9 +81,8 @@ def generate_dummy_package(ctx, folder): @task def go_work(_: Context): """ - Create a go.work file using the module list contained in get_default_modules() + Re-create the go.work file using the module list contained in get_default_modules() and the go version contained in the file .go-version. - If there is already a go.work file, it is renamed go.work.backup and a warning is printed. """ # read go version from the .go-version file, removing the bugfix part of the version @@ -91,10 +90,6 @@ def go_work(_: Context): with open(".go-version") as f: go_version = f.read().strip() - if os.path.exists("go.work"): - print("go.work already exists. Renaming to go.work.backup") - os.rename("go.work", "go.work.backup") - with open("go.work", "w") as f: f.write(f"go {go_version}\n\nuse (\n") for mod in get_default_modules().values():