printCompilationError formats and writes a compilation error to stderr. Redirect-only workflow errors are treated as informational messages rather than errors, since they occur when a redirect placeholder was downloaded without resolving to the full workflow content. In that case the user is directe
(err error, quiet bool)
| 851 | // workflow content. In that case the user is directed to run `gh aw update`. |
| 852 | // All other errors are written using FormatErrorChain for standard error formatting. |
| 853 | func printCompilationError(err error, quiet bool) { |
| 854 | var redirectErr *workflow.RedirectOnlyWorkflowError |
| 855 | if errors.As(err, &redirectErr) { |
| 856 | if !quiet { |
| 857 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage(redirectErr.Error())) |
| 858 | } |
| 859 | return |
| 860 | } |
| 861 | fmt.Fprintln(os.Stderr, console.FormatErrorChain(err)) |
| 862 | } |
| 863 | |
| 864 | // isCopilotWorkflowContent returns true when the workflow frontmatter declares engine: copilot. |
| 865 | // It is used to guard AddCopilotRequestsPermission injection so that the flag is only applied |
no test coverage detected