( command: Command<Name, Input, ContextInput, E, R>, error: CliError.ShowHelp, renderErrors: boolean )
| 1665 | } |
| 1666 | |
| 1667 | const showHelp = <Name extends string, Input, E, R, ContextInput>( |
| 1668 | command: Command<Name, Input, ContextInput, E, R>, |
| 1669 | error: CliError.ShowHelp, |
| 1670 | renderErrors: boolean |
| 1671 | ): Effect.Effect<void, CliError.CliError, Environment> => |
| 1672 | Effect.gen(function*() { |
| 1673 | const { builtIns } = yield* CliConfig.CliConfig |
| 1674 | const formatter = yield* CliOutput.Formatter |
| 1675 | const helpDoc = yield* getHelpForCommandPath(command, error.commandPath, builtIns) |
| 1676 | yield* Console.log(formatter.formatHelpDoc(helpDoc)) |
| 1677 | if (renderErrors && error.errors.length > 0) { |
| 1678 | yield* Console.error(formatter.formatErrors(error.errors as any)) |
| 1679 | } |
| 1680 | }) |
| 1681 | |
| 1682 | const showUserError = (error: CliError.UserError): Effect.Effect<void> => |
| 1683 | Effect.gen(function*() { |
no test coverage detected