MCPcopy Index your code
hub / github.com/docker/docker-agent / shouldOfferTour

Method shouldOfferTour

cmd/root/run.go:938–946  ·  view source on GitHub ↗

shouldOfferTour reports whether this interactive run should show the first-run dialog offering the getting-started tour. Automation and replay/record contexts never see the offer, and neither does a run that already carries an initial message (the user clearly has a task in mind); DOCKER_AGENT_NO_TO

(args []string)

Source from the content-addressed store, hash-verified

936// explicit --tour flag (or the getting-started command) bypasses the offer
937// and starts the tour directly.
938func (f *runExecFlags) shouldOfferTour(args []string) bool {
939 if f.lean || f.exitAfterResponse || f.sessionReadOnly || f.recordPath != "" || f.fakeResponses != "" {
940 return false
941 }
942 if len(args) > 1 {
943 return false
944 }
945 return tour.ShouldOffer(os.Getenv)
946}
947
948// runLeanTUI builds the App and drives the standalone lean TUI, used when
949// --lean is set. Unlike the full TUI it renders to the normal terminal buffer

Callers 1

tuiOptsMethod · 0.95

Calls 1

ShouldOfferFunction · 0.92

Tested by

no test coverage detected