Skip to content

Provide clear error when remote is missing in publish, track, delete --remote #80

@alexrinass

Description

@alexrinass

The publish, track, and delete --remote commands require a remote to function but don't validate upfront that one exists. Instead they let the underlying git call fail with a confusing low-level error (e.g. "does not appear to be a git repository").

Locations

  • cmd/publish.go:158, 173git.Fetch() warns on failure but git.PushBranch() hard-fails with a cryptic error
  • cmd/track.go:104git.Fetch() hard-fails with a raw git error
  • cmd/delete.go:145git.DeleteRemoteBranch() fails when remote doesn't exist

Expected Behavior

These commands should check git.RemoteExists(remote) early and return a clear error message like:

Error: No remote 'origin' configured. Cannot publish branch.

Related: #69, PR #74

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions