Skip to content

fix(dg): say git-remote-dash is missing before clone or publish runs git - #696

Merged
PastaPastaPasta merged 1 commit into
masterfrom
fix/dg-helper-missing
Nov 24, 2026
Merged

PastaPastaPasta merged 1 commit into
masterfrom
fix/dg-helper-missing

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

Without git-remote-dash on PATH:

  • dg repo clone prints only git's own message, followed by a generic E101:

    git: 'remote-dash' is not a git command. See 'git --help'.
    error: could not clone dash://…/mnqa-cli-plat [E101]
      cause: git clone exited with exit status: 128
      fix:   fix what the clone reported, then run the same command again
    
  • dg init and dg repo create --push create the repository on Platform and pay for it, and only then does the push fail the same way.

dg doctor already reports the missing helper, but nothing points a user there. Found in the mainnet-readiness CLI QA.

Both paths now check first with the existing helper_installed() (PATH plus git's exec-path) and stop with E206 before git runs, before anything is spent, and before a sealed key's passphrase is asked for. The error names git-remote-dash and how to install it. docs/errors.md E206 describes the new case.

error: not published: git can't push to dash:// URLs                    [E206]
  cause: git-remote-dash is not installed: git runs it for dash:// URLs, and it is not on PATH or in git's exec-path
  fix:   install git-remote-dash next to dg and put its directory on PATH (docs/INSTALL.md); `dg doctor` checks it
  note:  nothing was written

Test: crates/dg/tests/helper_missing.rs runs the real dg repo clone with a PATH that has git and no helper. It fails without the change and passes with it. Clippy and fmt are clean. Live check with the built binary: both dg init and dg repo clone stop with the E206 above, and nothing is written.

Not covered here: other commands that run dash:// git through git_dash (dg pr …, repo sync, make-public) still pass on git's message. That's a follow-up if wanted.

🤖 Generated with Claude Code

Without the helper on PATH, `dg repo clone` passed on git's "'remote-dash' is not a git
command" under a generic E101 ("fix what the clone reported"), and `dg init` / `dg repo create
--push` created the repository on Platform before the push failed the same way. Both now stop
first with E206, naming git-remote-dash and how to install it; `dg doctor` already checked it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a3daa434-4dde-48b9-b897-d17e4d7399b0
Commits

Reviewing files that changed from the base of the PR and between d582ba2 and 1cf2696.

Files selected for processing: 4

  • crates/dg/src/publish.rs
  • crates/dg/src/repo.rs
  • crates/dg/tests/helper_missing.rs
  • docs/errors.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: approve

Windows .exe is handled. helper_installed (crates/dg/src/repo.rs:987) looks for git-remote-dash{EXE_SUFFIX} with is_file(), which follows symlinks. That is git-remote-dash.exe on Windows, the name the release ships. split_paths handles ;, and the forward-slash output of Git for Windows' --exec-path joins fine as a PathBuf.

A helper found only through exec-path is not refused. git --exec-path (:992) runs with the inherited environment, so it reports GIT_EXEC_PATH when that is set. Verified on a sandbox: with PATH=/usr/bin:/bin and a stub git-remote-dash only in a GIT_EXEC_PATH copy, dg repo clone passed the check and git ran the stub. With no helper anywhere, it stopped with the E206 shown in the PR body, and no project/ directory was created.

It runs before any passphrase prompt or spend. In plan() the check (publish.rs:635) comes right after the v2 check and before load_bridge, connect, choose_storage (the interactive storage setup), confirm_plan and connect_with_identity, which is where a sealed key is unlocked. It only fires for Flow::CreatePush/Init, so plain dg repo create is not affected. In clone() (repo.rs:115) it runs after the cheap usage checks and before Report::new or git, and clone never unlocks a key.

Docs. docs/errors.md:138 sits under E206, names all three commands, and quotes git's own message. It points to INSTALL.md and dg doctor, matching the helper_missing cause and fix lines.

Tests. The new integration test passes. With the clone() check removed, it fails with git's 'remote-dash' is not a git command and the generic E101. All 608 dg bin unit tests pass. CI is green except playwright (read-only, testnet), which was still pending and is unrelated.

Non-blocking:

  • Both the E206 text and docs/errors.md:138 say "dg doctor checks it", but doctor only tries git-remote-dash on PATH (doctor.rs:427). A helper in exec-path alone passes this new check but fails in doctor. That predates this PR; a follow-up could make doctor use helper_installed().
  • When git itself is missing and the helper isn't on PATH, the user now gets E206 "helper missing" rather than a "git not found" message. This is an edge case and the fix still points to dg doctor, which reports git.
  • As the PR body says, the git_dash callers (dg pr …, repo sync, make-public) still show git's raw message.

🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta merged commit 1e382b5 into master Nov 24, 2026
20 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