Skip to content

Setup: the first Run offers Setup #131

Closed

Description

@JacobStephens2

Parent

#126

What to build

The first Run on a machine with no User config, started from a terminal (stdin and stderr both terminals), offers Setup before doing anything else. The order in a Run is: parse the arguments (a bad command still exits 2, with no offer), then the offer, then load the User config, then everything that follows today.

The offer, on stderr: No User config at <path>. Set your defaults now? [Y/n].

  • Yes runs the Setup questions, writes the file, and the Run carries on using it. Flags in the command (--no-merge, --email, --no-email, ...) still win over the fresh answers.
  • No writes the all-defaults User config, prints that thirdshift setup changes it, and the Run carries on. Later Runs don't offer again.
  • A User config that can't be written gives a warning: line and the Run carries on with the defaults.
  • Ctrl-C during the offer or the questions writes no file and ends the command before any work; no Run notification is sent.

A Run with no terminal offers nothing, writes nothing, and behaves exactly as today. help, version, update and email-test never offer Setup. See the spec in #126.

Acceptance criteria

  • From a terminal with no User config, a Run prints the offer on stderr before any work.
  • Accepting and choosing merge.always = true makes that same Run a Merge run; --no-merge in the command overrides it.
  • Declining writes the all-defaults file and a second Run does not offer.
  • A bad command exits 2 with no offer and no file.
  • With no terminal, a Run with no User config prints no offer, writes no file, and has today's outcome.
  • An unwritable User config location gives a warning: line and the Run completes on defaults.
  • Ctrl-C at the offer writes no file and does no work.
  • help, version, update and email-test never offer Setup, even with no User config and a terminal.
  • Stdout still holds only the pull request URL.
  • The README's User config section describes the offer and the no-terminal behavior, and the note that update, version and help never read the User config says they never offer Setup.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions