Documentation
¶
Overview ¶
Package shim generates the PATH-shadowing wrapper scripts for npm, pip, gem and cargo, and extracts the package names an install-like command line would actually install.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Tools = []string{"npm", "pip", "pip3", "gem", "cargo"}
Tools is the fixed set of commands installwall shims.
Functions ¶
func Ecosystem ¶
Ecosystem maps a shimmed tool name to the rules.Ecosystem it checks against. Kept here, not in package rules, to avoid an import cycle between shim and the CLI wiring that already imports rules directly.
func FindReal ¶
FindReal locates the real (non-shim) binary for a tool by searching PATH with the shim directory removed. This is what a shim script's "installwall exec <tool>" call resolves to once a check passes.
Types ¶
type Plan ¶
type Plan struct {
// Checked is true when this invocation installs new packages and
// should be checked. False for things like "npm run build" or
// "npm ci", which install nothing new and pass straight through.
Checked bool
Packages []Spec
}
Plan is the result of parsing one command line for one tool.