From dcac119e57a8edbae0912b4ed8a58190193dee3f Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Fri, 6 Mar 2026 18:49:16 +0000 Subject: [PATCH] fix(cmd/recipe): correct import path and add error handling for user input - Updated import path for recipe package to match module name. - Added error checking for fmt.Scanln to handle potential input errors gracefully. --- cmd/recipe.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/recipe.go b/cmd/recipe.go index c46d7f6..e4eb74e 100644 --- a/cmd/recipe.go +++ b/cmd/recipe.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" - "repos.gmgauthier.com/gmgauthier/grokkit/internal/recipe" // adjust if your module name differs + "gmgauthier.com/grokkit/internal/recipe" // adjust if your module name differs ) var recipeCmd = &cobra.Command{ @@ -84,7 +84,10 @@ func resolveRecipePath(nameOrPath string) (string, error) { if _, err := os.Stat(global); err == nil { fmt.Printf("Recipe %q not found in project.\nFound globally at %s\nUse this one? [y/N] ", nameOrPath, global) var answer string - fmt.Scanln(&answer) + _, err := fmt.Scanln(&answer) + if err != nil { + return "", err + } if strings.HasPrefix(strings.ToLower(answer), "y") { return global, nil }