-
Notifications
You must be signed in to change notification settings - Fork 312
Description
Problem
If a workflow generated by gh-aw places a step using gh aw logs before the extension install, the workflow fails with:
unknown command "aw" for "gh"
This can happen if a user edits the generated workflow or adds new steps without realizing the gh-aw extension is not globally available by default. The main source file for the workflow (.github/workflows/portfolio-analyst.md at https://github.com/github/gh-aw/blob/a0c0a8183fd045c9f3187bda167770d8897bd527/.github/workflows/portfolio-analyst.md) does not currently make this dependency explicit in a visible docstring or comment.
How to Reproduce
- In a workflow, put a step like this before installing the extension:
- name: Download logs from last 30 days run: gh aw logs ... - name: Install gh-aw extension run: gh extension install github/gh-aw
- The workflow will fail when it reaches the first step above.
Suggestion
- Update documentation in
.github/workflows/portfolio-analyst.mdand other relevant templates to explicitly warn that all steps depending ongh awmust come after the extension install step. - Consider generating workflows or additional comments that highlight this ordering dependency.
- Optionally, add a pre-step check or code comment to help users avoid this error in the future.
Impact
- Easy for new users to hit, since the order isn't always obvious.
- Trivial to fix, but frustrating if you don't realize the requirement.
This issue was originally encountered downstream in mhavelock/anthropicprinciple, but applies to all workflows generated by or derived from gh-aw configs.
Labels: workflow, bug, documentation
Note: I can also clone
github/gh-awto local to assist with any patch or PR if needed.