-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(cli): surface stale-workspace registration error instead of fake "not a git repo" #1332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2788087
2033514
28d007c
eb1cfca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -482,17 +482,19 @@ The CLI is standalone, but if you also want to interact via Telegram, Slack, Dis | |
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### "Cannot create worktree: not in a git repository" (but the repo exists) | ||
| ### "Cannot create worktree: repository registration failed" (stale workspace symlink) | ||
|
|
||
| The real cause is usually a stale symlink from a previous Archon run with a different path. Look for this in the error output: | ||
| This happens when `~/.archon/workspaces/<owner>/<repo>/source` is a symlink pointing at a previous checkout (common after moving or renaming the repo). The error message includes the exact cleanup path to follow: | ||
|
|
||
| ``` | ||
| Source symlink at ~/.archon/workspaces/.../source already points to <old-path>, expected <new-path> | ||
| Cannot create worktree: repository registration failed. | ||
| Error: Source symlink at ~/.archon/workspaces/<owner>/<repo>/source already points to <old-path>, expected <new-path> | ||
| Hint: Remove the stale workspace entry at ~/.archon/workspaces/<owner>/<repo> and retry, or use --no-worktree to skip isolation. | ||
| ``` | ||
|
Comment on lines
489
to
493
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a language to the fenced code block. Static analysis (markdownlint-cli2 MD040) flags the example block as missing a language identifier. Use 📝 Proposed fix-```
+```text
Cannot create worktree: repository registration failed.
Error: Source symlink at ~/.archon/workspaces/<owner>/<repo>/source already points to <old-path>, expected <new-path>
Hint: Remove the stale workspace entry at ~/.archon/workspaces/<owner>/<repo> and retry, or use --no-worktree to skip isolation.Verify each finding against the current code and only fix it if needed. In |
||
|
|
||
| Fix it by manually deleting the stale workspace folder at `~/.archon/workspaces/<github-user>/<repo-name>` and retrying the command. | ||
| Follow the hint — delete the stale workspace folder and re-run, or pass `--no-worktree` to skip isolation for one run. | ||
|
|
||
| > In the future, `archon isolation cleanup` will handle this automatically. | ||
| > On Archon versions before this fix, the same root cause surfaced as the misleading "Cannot create worktree: not in a git repository" (even though the repo was valid). If you see that string, upgrade and you'll get the actionable message above. | ||
|
|
||
| --- | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.