From 7f82db1f1c7c6118ed9c141580fbd587236b9be5 Mon Sep 17 00:00:00 2001 From: Robin Diddams Date: Tue, 3 Jun 2025 11:54:15 -0500 Subject: [PATCH 1/2] Show project error if no tty --- internal/project/project.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/project/project.go b/internal/project/project.go index 8a638812..25ab2ca9 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -664,7 +664,12 @@ func ResolveProjectDir(logger logger.Logger, cmd *cobra.Command, required bool) os.Chdir(dir) return dir } - tui.ShowBanner("Agentuity Project Not Found", "No Agentuity project file not found in the directory "+abs+"\n\nMake sure you are in an Agentuity project directory or use the --dir flag to specify a project directory.", false) + explanation := "No Agentuity project file not found in the directory " + abs + "\n\nMake sure you are in an Agentuity project directory or use the --dir flag to specify a project directory." + if tui.HasTTY { + tui.ShowBanner("Agentuity Project Not Found", explanation, false) + } else { + logger.Error(explanation) + } os.Exit(1) } if ProjectExists(abs) { From fd92dc76875318d48f109dc4af2b9fe5eafa1c2b Mon Sep 17 00:00:00 2001 From: Robin Diddams Date: Mon, 9 Jun 2025 10:07:35 -0500 Subject: [PATCH 2/2] grammer --- internal/project/project.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/project/project.go b/internal/project/project.go index 25ab2ca9..35a6597a 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -664,7 +664,7 @@ func ResolveProjectDir(logger logger.Logger, cmd *cobra.Command, required bool) os.Chdir(dir) return dir } - explanation := "No Agentuity project file not found in the directory " + abs + "\n\nMake sure you are in an Agentuity project directory or use the --dir flag to specify a project directory." + explanation := "No Agentuity project file found in the directory " + abs + "\n\nMake sure you are in an Agentuity project directory or use the --dir flag to specify a project directory." if tui.HasTTY { tui.ShowBanner("Agentuity Project Not Found", explanation, false) } else {