Error implements the error interface. Returns an informational message explaining that the file is a redirect placeholder and telling the user how to resolve it.
()
| 342 | // Returns an informational message explaining that the file is a redirect placeholder |
| 343 | // and telling the user how to resolve it. |
| 344 | func (e *RedirectOnlyWorkflowError) Error() string { |
| 345 | filename := filepath.Base(e.Path) |
| 346 | |
| 347 | msg := fmt.Sprintf( |
| 348 | "Redirect-only workflow detected: %s\n\n"+ |
| 349 | "This workflow file is a redirect placeholder and is missing the 'on' trigger field.\n"+ |
| 350 | "The redirect was not resolved to the full workflow content during download.\n\n", |
| 351 | filename, |
| 352 | ) |
| 353 | if e.Target != "" { |
| 354 | msg += fmt.Sprintf("This workflow redirects to: %s\n\n", e.Target) |
| 355 | } |
| 356 | msg += "Run 'gh aw update' to follow the redirect and get the full workflow.\n\n" + |
| 357 | "Skipping compilation." |
| 358 | return msg |
| 359 | } |
no outgoing calls