mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-30 07:01:18 +01:00
fix: ignore absent extensions SBOM directory
Do not log errors when running without system extensions Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
This commit is contained in:
parent
9920da3e1a
commit
3f35b83ae3
@ -7,6 +7,7 @@ package runtime
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -72,6 +73,11 @@ func (ctrl *SBOMItemController) Run(ctx context.Context, r controller.Runtime, l
|
||||
{true, ctrl.ExtensionSPDXPath},
|
||||
} {
|
||||
if err := ctrl.processSPDXDirectory(ctx, r, logger, spec.path, spec.isExtension); err != nil {
|
||||
if spec.isExtension && errors.Is(err, os.ErrNotExist) {
|
||||
// Extension SBOM directory is only present if extensions are installed
|
||||
continue
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user