Skip to content

Commit a127fe7

Browse files
committed
improvement(setup): don't tell CLI-runtime users to install Docker Desktop
Having the docker CLI but neither GUI app is exactly what a colima or Rancher Desktop user looks like, and the failure told them to install Docker Desktop — advice for a problem they don't have. Name the situation accurately and add starting an existing runtime as an option.
1 parent b07b731 commit a127fe7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

scripts/setup/docker.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ const INSTALL_HINTS = [
1212
`or OrbStack (lighter on macOS): ${theme.command('brew install orbstack')}`,
1313
]
1414

15+
/**
16+
* Reaching this means the docker CLI exists but neither GUI app does, which is
17+
* also what a colima or Rancher Desktop user looks like — telling them to
18+
* install Docker Desktop would be advice for a problem they don't have.
19+
*/
20+
const NO_APP_HINTS = [
21+
...INSTALL_HINTS,
22+
`or start your existing runtime its own way, e.g. ${theme.command('colima start')}`,
23+
]
24+
1525
/** macOS GUI docker providers we know how to launch via `open -a`. */
1626
const ORBSTACK_APP = { name: 'OrbStack', bundle: 'OrbStack.app' } as const
1727
const DOCKER_DESKTOP_APP = { name: 'Docker', bundle: 'Docker.app' } as const
@@ -142,7 +152,7 @@ export async function ensureDocker(required: boolean): Promise<boolean> {
142152
`reinstall it: ${theme.command('brew install orbstack')}`,
143153
`or point the CLI elsewhere: unset DOCKER_HOST and DOCKER_CONTEXT, then ${theme.command('docker context use <name>')}`,
144154
])
145-
: launchFailed(required, 'No docker app is installed.', INSTALL_HINTS)
155+
: launchFailed(required, 'Found the docker CLI, but no app to start.', NO_APP_HINTS)
146156
}
147157

148158
const spin = p.spinner()

0 commit comments

Comments
 (0)