asdf-vm/asdf · error
unable to list plugins: %w
Error message
unable to list plugins: %w
What it means
InstallAll first enumerates installed plugins via plugins.List. If listing fails (usually filesystem access problems on the plugins directory, since List walks plugin dirs and reads their metadata), InstallAll aborts immediately, returning this single wrapped error instead of attempting installs. The %w wrap preserves the underlying cause for errors.Is/As inspection.
Source
Thrown at internal/versions/versions.go:72
// VersionAlreadyInstalledError is returned whenever a version is already
// installed.
type VersionAlreadyInstalledError struct {
toolName string
version toolversions.Version
}
func (e VersionAlreadyInstalledError) Error() string {
return fmt.Sprintf("version %s of %s is already installed", e.version.Value, e.toolName)
}
// InstallAll installs all specified versions of every tool for the current
// directory. Typically this will just be a single version, if not already
// installed, but it may be multiple versions if multiple versions for the tool
// are specified in the .tool-versions file.
func InstallAll(conf config.Config, dir string, stdOut io.Writer, stdErr io.Writer) (failures []error) {
plugins, err := plugins.List(conf, false, false)
if err != nil {
return []error{fmt.Errorf("unable to list plugins: %w", err)}
}
// Ideally we should install these in the order they are specified in the
// closest .tool-versions file, but for now that is too complicated to
// implement.
for _, plugin := range plugins {
err := Install(conf, plugin, dir, stdOut, stdErr)
if err != nil {
failures = append(failures, err)
}
}
return failures
}
// Install installs all specified versions of a tool for the current directory.
// Typically this will just be a single version, if not already installed, but
// it may be multiple versions if multiple versions for the tool are specifiedView on GitHub (pinned to 074a1722ca)
Solutions
- Inspect the wrapped cause (errors.Unwrap / printed chain) to find the filesystem problem
- Fix permissions on the plugins directory under ASDF_DATA_DIR
- Remove/re-add the broken plugin directory that breaks List
- Run `asdf plugin list` to see whether listing works at all
Defensive patterns
Strategy: try-catch
Validate before calling
if _, err := plugins.List(conf, false, false); err != nil {
return fmt.Errorf("plugins dir unusable: %w", err)
} Try / catch
failures := versions.InstallAll(conf, dir, stdOut, stdErr)
for _, err := range failures {
if strings.Contains(err.Error(), "unable to list plugins") {
// fix data dir access before any installs
}
} Prevention
- Verify plugins dir permissions after changing ASDF_DATA_DIR
- Run `asdf plugin list` as a smoke check in CI setup
When it happens
Trigger: Calling versions.InstallAll when plugins.List returns an error — e.g. the plugins directory under conf.DataDir is unreadable, or a plugin's repo is in a state List cannot handle.
Common situations: Corrupted or permission-denied ~/.asdf/plugins directory, ASDF_DATA_DIR misconfigured, partial plugin directory left by an interrupted add.
Related errors
- unable to create download dir: %w
- unable to create install dir: %w
- unable to create download dir: %w
- unable to fetch current directory: %w
- failed to run download callback: %w
AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30).
Data as JSON: /api/errors/e400c9b8331b0d03.
Report an issue: GitHub.