Documentation
¶
Overview ¶
Package mounts implements the mounts apply step: activation of systemd mount units whose unit files are already placed by mise. This step never writes unit files — placement is mise's job; it only runs mkdir for the destinations and systemctl for activation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecRunner ¶
type ExecRunner struct {
Verbose bool
// Out/Err are the Verbose streaming destinations; nil defaults to
// os.Stdout/os.Stderr.
Out io.Writer
Err io.Writer
}
ExecRunner runs commands via exec.CommandContext. Verbose streams child stdout/stderr live to Out/Err while still capturing and echoes each command line set -x-style ("+ argv") to Err before it runs, so failure errors keep their output suffix.
func (ExecRunner) Run ¶
func (r ExecRunner) Run(ctx context.Context, argv []string) error
Run executes argv[0] with argv[1:], returning the combined output on failure so callers can log systemctl's own diagnostics (e.g. "not loaded"). In Verbose mode the output also streams live (MultiWriter) and the command line is echoed set -x-style ("+ argv") to Err immediately before execution, so the error contract is unchanged.
func (*ExecRunner) SetVerbose ¶ added in v0.5.0
func (r *ExecRunner) SetVerbose(v bool)
SetVerbose toggles live output streaming.
type Step ¶
type Step struct {
Runner Runner
Plan resolve.MountsStep
}
Step activates the mount units of a resolved plan: it creates every destination directory, reloads systemd once so it picks up the unit files mise placed, then enables (or disables) each mount unit — plus its timer unit when the entry declares StartAt.