1
0
mirror of https://github.com/etcd-io/etcd.git synced 2026-02-05 06:46:49 +01:00

Silence BOM first run expected error

The tool github.com/appscodelabs/license-bill-of-materials fails during
the first run in a recently cloned/fresh repository. Because it captures
the output, and the first run shows the download of dependencies. In
8b02416301, we intentionally added a new
execution before evaluating whether the BOM is up to date. However, this
is polluting the logs as it has the expected failure. Redirecting the
output to /dev/null alleviates the issue.

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes
2025-10-16 11:36:52 -07:00
parent 75f7329092
commit 56b582fd36
2 changed files with 4 additions and 1 deletions

View File

@@ -519,7 +519,7 @@ function bom_pass {
# Intentionally run the command once first, so it fetches dependencies. The exit code on the first
# run in a just cloned repository is always dirty.
GOOS=linux run_go_tool github.com/appscodelabs/license-bill-of-materials \
--override-file ./bill-of-materials.override.json "${modules[@]}"
--override-file ./bill-of-materials.override.json "${modules[@]}" &> /dev/null
# BOM file should be generated for linux. Otherwise running this command on other operating systems such as OSX
# results in certain dependencies being excluded from the BOM file, such as procfs.

View File

@@ -27,6 +27,9 @@ function bom_fixlet {
# shellcheck disable=SC2207
modules=($(modules_for_bom))
GOOS=linux run_go_tool "github.com/appscodelabs/license-bill-of-materials" \
--override-file ./bill-of-materials.override.json "${modules[@]}" &> /dev/null
# BOM file should be generated for linux. Otherwise running this command on other operating systems such as OSX
# results in certain dependencies being excluded from the BOM file, such as procfs.
# For more info, https://github.com/etcd-io/etcd/issues/19665