{"record":{"id":"636da34ce170e7b7","repo":"asdf-vm/asdf","slug":"no-plugin-name-specified","errorCode":null,"errorMessage":"no plugin name specified","messagePattern":"no plugin name specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cli/cli.go","lineNumber":626,"sourceCode":"\t\tenv, err = execenv.Generate(plugin, env)\n\t\tif _, ok := err.(plugins.NoCallbackError); !ok && err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\terr = hook.RunWithOutput(conf, fmt.Sprintf(\"pre_%s_%s\", plugin.Name, filepath.Base(executable)), args, os.Stdout, os.Stderr)\n\tif err != nil {\n\t\tcli.OsExiter(1)\n\t\treturn err\n\t}\n\n\tfinalEnv := execute.MergeWithCurrentEnv(env)\n\treturn exec.Exec(executable, args, finalEnv)\n}\n\nfunc extensionCommand(logger *log.Logger, args []string) error {\n\tif len(args) < 1 {\n\t\terr := errors.New(\"no plugin name specified\")\n\t\tlogger.Printf(\"%s\", err.Error())\n\t\treturn err\n\t}\n\n\tconf, err := config.LoadConfig()\n\tif err != nil {\n\t\tlogger.Printf(\"error loading config: %s\", err)\n\t\treturn err\n\t}\n\n\tpluginName := args[0]\n\tplugin := plugins.New(conf, pluginName)\n\n\terr = runExtensionCommand(plugin, args[1:])\n\tlogger.Printf(\"error running extension command: %s\", err.Error())\n\treturn err\n}\n","sourceCodeStart":608,"sourceCodeEnd":644,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/cli/cli.go#L608-L644","documentation":"`asdf plugin <command> <name>` (extensionCommand dispatches to plugin binaries) requires the plugin/tool name as the first argument. When no argument is supplied, it logs and returns this error before any config is loaded.","triggerScenarios":"Invoking a plugin/extension subcommand (e.g. `asdf plugin add`, `asdf list`) with zero arguments, so len(args) < 1.","commonSituations":"Typing `asdf plugin` alone expecting a listing; scripting with an empty variable, e.g. `asdf plugin add $PLUGIN` where PLUGIN is unset.","solutions":["Pass the plugin name as the first argument, e.g. `asdf plugin add nodejs`","Quote/verify script variables so an unset variable does not disappear from argv","Run the command with `--help` to see required arguments"],"exampleFix":"// before\n$ asdf plugin add\n// after\n$ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git","handlingStrategy":"validation","validationCode":"if [ -z \"$1\" ]; then\n  echo \"usage: asdf plugin add <name> [git-url]\" >&2\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":"out=$(asdf plugin add \"$PLUGIN\" 2>&1) || {\n  echo \"plugin add failed: $out\" >&2\n}","preventionTips":["Always pass the plugin name positionally; never rely on possibly-empty variables","Use \"${PLUGIN:?unset}\" in bash to fail fast on empty vars","Check `asdf plugin --help` for per-subcommand required args"],"tags":["cli","missing-argument","plugins"],"backgroundTag":"missing-required-argument","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}