bootstraper

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfirmOrAbortFn = utils.ConfirmOrAbort

Functions

func RunStream

func RunStream(ctx context.Context, r runner.CommandRunner,
	timeout time.Duration, name string, args ...string,
) error

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL