diff --git a/src/cli/setup.ts b/src/cli/setup.ts index af03ca4..a7e5f60 100644 --- a/src/cli/setup.ts +++ b/src/cli/setup.ts @@ -239,14 +239,13 @@ if (process.env.USER === 'cli') { const disabled = ['shell', 'get', 'open'] for (const name of disabled) { const cmd = program.commands.find((c) => c.name() === name) - if (cmd) { - cmd.helpInformation = () => '' - ;(cmd as any)._hidden = true - cmd.action(() => { - console.error(`"${name}" is not available over SSH`) - process.exit(1) - }) - } + if (!cmd) continue + cmd.helpInformation = () => '' + ;(cmd as any)._hidden = true + cmd.action(() => { + console.error(`"${name}" is not available over SSH`) + process.exit(1) + }) } }