asdf-vm/asdf · error

System version is selected

Error message

System version is selected

What it means

`asdf where <tool>` prints the install path of the currently selected version. If the resolved version type is 'system' (i.e. the system-installed tool is selected, not an asdf-managed one), there is no asdf install path to print, so it returns this error.

Source

Thrown at internal/cli/cli.go:1528

	if err != nil {
		logger.Printf("unable to get current directory: %s", err)
		return err
	}

	plugin := plugins.New(conf, tool)
	err = plugin.Exists()
	if err != nil {
		if _, ok := err.(plugins.PluginMissing); ok {
			logger.Printf("No such plugin: %s", tool)
		}
		return err
	}

	version := toolversions.Parse(versionStr)

	if version.Type == "system" {
		logger.Printf("System version is selected")
		return errors.New("System version is selected")
	}

	if version.Value == "" {
		// resolve version
		versions, found, err := resolve.Version(conf, plugin, currentDir)
		if err != nil {
			fmt.Printf("err %#+v\n", err)
			return err
		}

		if found && len(versions.Versions) > 0 {
			versionStruct := toolversions.Version{Type: "version", Value: versions.Versions[0]}
			if installs.IsInstalled(conf, plugin, versionStruct) {
				installPath := installs.InstallPath(conf, plugin, versionStruct)
				fmt.Printf("%s", installPath)
				return nil
			}
		}

View on GitHub (pinned to 074a1722ca)

Solutions

  1. Set a concrete asdf-managed version: `asdf set <tool> <version>` (or edit .tool-versions) for the directory
  2. Find the system binary instead with `which <tool-cmd>` since it's outside asdf's control
  3. Install an asdf version if none exists: `asdf install <tool> <version>`

Example fix

# before (.tool-versions)
nodejs system
# after
nodejs 20.12.0
Defensive patterns

Strategy: validation

Validate before calling

if grep -E "^$TOOL[[:space:]]+system$" .tool-versions ~/.config/asdf/default 2>/dev/null; then
  echo "$TOOL is set to system; asdf where has no install path" >&2
fi

Try / catch

path=$(asdf where "$TOOL" 2>&1) || {
  echo "$path" # system selected: use `which <cmd>` instead
}

Prevention

When it happens

Trigger: Running `asdf where <tool>` while the tool's version resolves to 'system' via .tool-versions (`<tool> system`) or the legacy global 'system' setting.

Common situations: Directories whose .tool-versions pins `<tool> system`; users expecting a path but having opted out of asdf management for that tool; inheriting a system pin from a parent config.

Related errors


AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30). Data as JSON: /api/errors/7a8271346119ec9b. Report an issue: GitHub.