Skip to content

docs: Clarify required value is an SSH Destination#334

Open
th3james wants to merge 3 commits into
mainfrom
improve-unspecified-target-error
Open

docs: Clarify required value is an SSH Destination#334
th3james wants to merge 3 commits into
mainfrom
improve-unspecified-target-error

Conversation

@th3james

Copy link
Copy Markdown
Contributor

Changes

  • Make it clearer what target is, rather than just yelling that it hasn't been provided

@th3james th3james requested a review from a team as a code owner July 10, 2026 16:19

@federicobozzini federicobozzini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor question but looks good to me.

Comment thread cmd/topo/root.go Outdated
t, exists := lookupTarget(cmd)
if !exists {
return "", fmt.Errorf("target not specified: provide --target or set TOPO_TARGET env var")
return "", fmt.Errorf("target not specified: set --target or %s to the SSH destination Topo should connect to (e.g. user@example.local)", targetEnvVar)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we happy to use connect here? It might suggest some statefulness.

Comment thread cmd/topo/root.go Outdated
t, exists := lookupTarget(cmd)
if !exists {
return "", fmt.Errorf("target not specified: provide --target or set TOPO_TARGET env var")
return "", fmt.Errorf("target not specified: set --target or %s to the SSH destination Topo should connect to (e.g. user@example.local)", targetEnvVar)

@muchzill4 muchzill4 Jul 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a fan of this. I think the correct place to explain the purpose of arguments is --help/usage. We shouldn’t duplicate that information whenever a command fails because an argument wasn't supplied.
Try git clone w/o repo to clone. Or bare docker run.

If we keep it, perhaps make it more conversational: ”where to deploy to? set —target or TARGET_ENV”

The description of —target in usage could definitely be improved though w/ the e.g. you’ve added here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, I rescind my comment. I think this is amazing for agentic stuff. We should look for other opportunities to apply this pattern. 👍

@th3james th3james force-pushed the improve-unspecified-target-error branch from 880eea7 to b449ce8 Compare July 13, 2026 16:38
@th3james

Copy link
Copy Markdown
Contributor Author

@muchzill4 @federicobozzini Realised we were missing the obvious answer here - a short, concise error message, and a revamp of our rather neglected root command description.

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.

3 participants