Skip to content

Fix: Warn when a named course matches no build folder (fixes #92) - #93

Merged
oliverfoster merged 1 commit into
masterfrom
issue/92
Oct 7, 2026
Merged

oliverfoster merged 1 commit into
masterfrom
issue/92

Conversation

@swashbuck

@swashbuck swashbuck commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #92

Fix

  • A course name that matches no folder in builds/ is now reported, instead of rub finishing silently as though there were nothing to do.
  • The message names what was asked for and lists the course names that are available, so a near-miss like m05 against m05-mycourse is obvious from the output.

Tasks.filterOutputDirs already detected this case and returned null; it just never said anything. The warning goes in at that point, before the null is returned, so the existing control flow is unchanged.

Testing

  1. Open an Adapt folder whose builds/ directory holds at least one course, e.g. m05-mycourse and p101.

  2. Run rub -ds m05. Expect:

    No course found matching: m05
    Available courses: p101, m05-mycourse
    Finished.
    
  3. Run rub -ds m05-mycourse. Expect the build and server to run as before, with no warning.

  4. Run rub -ds with no course name. Expect all courses to build as before, with no warning.


Posted via collaboration with Claude Code

@swashbuck swashbuck added the bug label Sep 21, 2026
@swashbuck swashbuck self-assigned this Sep 21, 2026

@oliverfoster oliverfoster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran Tasks.filterOutputDirs with rub's own modules against a layout of m05-mycourse and p101:

course names output returns
m05 "No course found matching: m05" / "Available courses: m05-mycourse, p101" null (unchanged)
m05-mycourse none that course
none none all courses
m05, empty builds folder "No course found matching: m05" / "No courses were found in this folder." null

The destructured warn/notice are safe to call detached, since Logger's static methods reference Logger rather than this.

@oliverfoster
oliverfoster merged commit 8f2b8a2 into master Oct 7, 2026
1 check passed
@oliverfoster
oliverfoster deleted the issue/92 branch October 7, 2026 14:55
github-actions Bot pushed a commit that referenced this pull request Oct 7, 2026
## [1.0.2](v1.0.1...v1.0.2) (2026-10-07)

### Chore

* use shared workflow files (#87) ([d73a33c](d73a33c)), closes [#87](#87)

### Fix

* warn when a named course matches no build folder (#93) ([8f2b8a2](8f2b8a2)), closes [#93](#93)
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when a named course matches no build folder

2 participants