diff --git a/cmd/onboard.go b/cmd/onboard.go index defd7c2..615a193 100644 --- a/cmd/onboard.go +++ b/cmd/onboard.go @@ -4,6 +4,7 @@ package cmd import ( + "bytes" "context" "errors" "fmt" @@ -31,6 +32,13 @@ import ( type fsVar map[string]string +type errorLog struct{} + +func (e errorLog) Write(p []byte) (int, error) { + slog.Error(string(bytes.TrimSpace(p))) + return len(p), nil +} + var ( cipherSuite string dlDir string @@ -288,6 +296,7 @@ func transferOwnership2(transport fdo.Transport, to1d *cose.Sign1[protocol.To1d, } return filepath.Join(dlDir, filepath.Base(cleanName)) }, + ErrorLog: &errorLog{}, } } if echoCmds {