From a996ba74268e13e2524de9ff8aea07916dd12322 Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Sat, 22 Feb 2025 15:47:09 -0800 Subject: [PATCH] scripts/updatebom: remove innecessary mod override The `GOFLAGS=-mod=mod` environment variable is not required, as that's the default mode. This code was likely copied from the tests, where `GOFLAGS` is set to `-mod=readonly`. So, executing the tool needs to override `mod`, as per the documentation, it tends to modify the `go.mod` file. Signed-off-by: Ivan Valdes --- scripts/updatebom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/updatebom.sh b/scripts/updatebom.sh index 2c6bf8720b0d..96f6ffa46c64 100755 --- a/scripts/updatebom.sh +++ b/scripts/updatebom.sh @@ -14,7 +14,7 @@ function bom_fixlet { # shellcheck disable=SC2207 modules=($(modules_for_bom)) - if GOFLAGS=-mod=mod run_go_tool "github.com/appscodelabs/license-bill-of-materials" \ + if run_go_tool "github.com/appscodelabs/license-bill-of-materials" \ --override-file ./bill-of-materials.override.json \ "${modules[@]}" > ./bill-of-materials.json.tmp; then cp ./bill-of-materials.json.tmp ./bill-of-materials.json