Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfirmOrAbortFn = utils.ConfirmOrAbort
Functions ¶
Types ¶
type Bootstraper ¶
type Bootstraper struct {
Runner runner.CommandRunner
}
Bootstraper manages the bootstrap process for setting up ZSH.
Fields:
- Config: The configuration object containing user-defined settings.
- Runner: An instance of InteractiveRunner to execute commands.
Description: This struct encapsulates the logic for installing and configuring ZSH as the default shell.
func New ¶
func New(r runner.CommandRunner) *Bootstraper
New creates a new instance of Bootstraper.
Parameters:
- config: The configuration object containing user-defined settings.
- r: An instance of InteractiveRunner to execute commands.
Returns:
- *Bootstraper: A pointer to the newly created Bootstraper instance.
Notes: If no runner is provided, a default StreamingRunner is used.
func (*Bootstraper) Execute ¶
func (d *Bootstraper) Execute() error
Execute starts the bootstrap process for setting up ZSH.
Returns:
- error: If any step in the bootstrap process fails.
Behavior:
- Displays a warning message about the bootstrap process.
- Prompts the user for confirmation before proceeding.
- Calls setupZSH to handle the ZSH setup process.
description: This method is the entry point for executing the bootstrap process. It handles user confirmation and calls the setupZSH method to perform the actual setup. It also handles any errors that may occur during the process.
Click to show internal directories.
Click to hide internal directories.