mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-30 23:21:14 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -72,6 +73,11 @@ func (ctrl *SBOMItemController) Run(ctx context.Context, r controller.Runtime, l
|
|||||||
{true, ctrl.ExtensionSPDXPath},
|
{true, ctrl.ExtensionSPDXPath},
|
||||||
} {
|
} {
|
||||||
if err := ctrl.processSPDXDirectory(ctx, r, logger, spec.path, spec.isExtension); err != nil {
|
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
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user