Skip to content

Commit 83dbc69

Browse files
doctor: print the setup hint before anything else when credentials are missing
A new user's first command is doctor. Reading the publication URL first means the setup instructions are the whole output rather than a footnote under a half-printed config table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 89b866a commit 83dbc69

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎substack_cli/cli.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def _ask(prompt, secret=False):
195195

196196
def cmd_doctor(client, args):
197197
"""Verify auth and print the resolved configuration."""
198-
source = client.config.source or "environment variables"
199-
ui.kv("config", source, 14)
200-
ui.kv("publication", client.config.publication_url, 14)
198+
publication = client.config.publication_url # raises the setup hint first
199+
ui.kv("config", client.config.source or "environment variables", 14)
200+
ui.kv("publication", publication, 14)
201201

202202
publication_id, user_id = client.whoami()
203203
details = client.publication()

0 commit comments

Comments
 (0)