File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,10 @@ function bom_pass {
502
502
run cp go.sum go.sum.tmp || return 2
503
503
run cp go.mod go.mod.tmp || return 2
504
504
505
- output=$( GOFLAGS=-mod=mod run_go_tool github.com/appscodelabs/license-bill-of-materials \
505
+ # BOM file should be generated for linux. Otherwise running this command on other operating systems such as OSX
506
+ # results in certain dependencies being excluded from the BOM file, such as procfs.
507
+ # For more info, https://github.com/etcd-io/etcd/issues/19665
508
+ output=$( GOOS=linux GOFLAGS=-mod=mod run_go_tool github.com/appscodelabs/license-bill-of-materials \
506
509
--override-file ./bill-of-materials.override.json \
507
510
" ${modules[@]} " )
508
511
code=" $? "
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ function tool_pkg_dir {
320
320
# tool_get_bin [tool]
321
321
function run_go_tool {
322
322
local cmdbin
323
- if ! cmdbin=$( GOARCH=" " tool_get_bin " ${1} " ) ; then
323
+ if ! cmdbin=$( GOARCH=" " GOOS= " " tool_get_bin " ${1} " ) ; then
324
324
log_warning " Failed to install tool '${1} '"
325
325
return 2
326
326
fi
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ function bom_fixlet {
14
14
# shellcheck disable=SC2207
15
15
modules=($( modules_for_bom) )
16
16
17
- if GOFLAGS=-mod=mod run_go_tool " github.com/appscodelabs/license-bill-of-materials" \
17
+ # BOM file should be generated for linux. Otherwise running this command on other operating systems such as OSX
18
+ # results in certain dependencies being excluded from the BOM file, such as procfs.
19
+ # For more info, https://github.com/etcd-io/etcd/issues/19665
20
+ if GOOS=linux GOFLAGS=-mod=mod run_go_tool " github.com/appscodelabs/license-bill-of-materials" \
18
21
--override-file ./bill-of-materials.override.json \
19
22
" ${modules[@]} " > ./bill-of-materials.json.tmp; then
20
23
cp ./bill-of-materials.json.tmp ./bill-of-materials.json
You can’t perform that action at this time.
0 commit comments