From b2172b8546c1f9e39f07e9f9c127f602e1438fcc Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sat, 7 Mar 2026 17:41:09 +0000 Subject: [PATCH] fix(recipe): improve unsafe shell command error message Update the error message for unsafe shell commands to be more concise and user-friendly, removing redundant "ERROR:" prefix and "try again" instruction. --- internal/recipe/loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/recipe/loader.go b/internal/recipe/loader.go index bb42651..6bf3c2d 100644 --- a/internal/recipe/loader.go +++ b/internal/recipe/loader.go @@ -51,7 +51,7 @@ func Load(path string, userParams map[string]any) (*Recipe, error) { for _, cmd := range r.AllowedShellCommands { trimmed := strings.TrimSpace(strings.ToLower(cmd)) if !safeReadOnlyCommands[trimmed] && !strings.HasPrefix(trimmed, "git status") && !strings.HasPrefix(trimmed, "git log") { - return nil, fmt.Errorf("\u001B[31mERROR: Recipe contains unsafe shell command: %q\u001B[0m Remove or replace the dangerous command and try again", cmd) + return nil, fmt.Errorf("\u001B[31mRecipe contains unsafe shell command: %q. Remove or replace the dangerous command in your recipe.\u001B[0m", cmd) } }