Skip to content

fix: use the learner's own CLI and exercises folder - #26

Merged
jiaxinnns merged 3 commits into
mainfrom
fix/cli-path-resolution
Sep 26, 2026
Merged

jiaxinnns merged 3 commits into
mainfrom
fix/cli-path-resolution

Conversation

@jiaxinnns

@jiaxinnns jiaxinnns commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Overview

The app was installing the CLI into the learner's save folder and putting that folder first on PATH, so a stray executable could shadow git. It now uses a CLI the learner installed themselves, and asks where they ran gitmastery setup.

Solution

  • Resolve gitmastery from the normal PATH, plus Homebrew prefixes on macOS. The app no longer downloads or installs the CLI.
  • Drop onboarding and the setup checklist. The first Start shows a short intro, then checks the CLI (and Git Bash on Windows), then asks for the exercises folder.
  • Accept a folder that contains .gitmastery.json, or a parent with exactly one such folder. Setup Instructions in that copy opens T1L2 inside the app. An X forgets the link without deleting files.

Test cases

  • A fresh launch opens the lessons, with no onboarding screen
  • Start with no CLI shows the tools step; Setup instructions opens T1L2 in the app, not a browser
  • The folder step says this does not set up Git-Mastery; the Setup Instructions link opens T1L2 and closes the dialog
  • Picking the folder where gitmastery setup was run is accepted; a folder without .gitmastery.json is rejected
  • The X unlinks the path and clears progress; the folder is still on disk
  • After the folder is linked, Start downloads if needed and moves into the exercise; Verify runs
  • On Windows, the tools step says to restart the app and has no Check again button

jiaxin.loh and others added 2 commits September 24, 2026 17:39
Verify was spawning a hard-coded save-folder path, so a self-installed
CLI was invisible on Windows while the in-app terminal still found it.

Co-authored-by: Cursor <cursoragent@cursor.com>
… them

Prepending the save folder to PATH let a stray executable shadow git, and the app was setting up a CLI the lessons already tell learners to install.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jiaxinnns jiaxinnns changed the title fix: resolve the Git-Mastery CLI through PATH fix: use the learner's own CLI and exercises folder Sep 26, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@jiaxinnns
jiaxinnns merged commit 7133152 into main Sep 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant