installer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package installer runs a worktree's install step: either a user-supplied list of commands, or an auto-detected JS package manager's install command based on lockfiles present. It also detects a suggested install command for other ecosystems (Go, Python, Java, Rust, Ruby, PHP, .NET) for `wt init` to write into .wt.toml — those don't get run automatically, since each build tool already fetches its own dependencies lazily.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(dir string, commands []string) error

Install runs the worktree's install step in dir. If commands is non-empty, each entry is run in order through the shell (so entries can use shell syntax like "&&" or pipes), stopping at the first failure. Otherwise it falls back to detecting a JS package manager from dir's lockfile. It's a no-op (with a status line) if commands is empty and no known lockfile is present.

func Suggest added in v0.1.3

func Suggest(dir string) []string

Suggest returns install commands worth writing to .wt.toml for dir. Returns nil if a JS lockfile is present (Install already auto-detects those at runtime without any config needed) or if nothing was detected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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