diff --git a/internal/homesick/core/core.go b/internal/homesick/core/core.go index f3c3f36..6668437 100644 --- a/internal/homesick/core/core.go +++ b/internal/homesick/core/core.go @@ -28,6 +28,13 @@ type App struct { } func New(stdout io.Writer, stderr io.Writer) (*App, error) { + if stdout == nil { + return nil, errors.New("stdout writer cannot be nil") + } + if stderr == nil { + return nil, errors.New("stderr writer cannot be nil") + } + home, err := os.UserHomeDir() if err != nil { return nil, fmt.Errorf("resolve home directory: %w", err)