{"record":{"id":"1360c8223decb077","repo":"hashicorp/packer","slug":"multiple-paths-are-no-longer-supported-for-packer","errorCode":null,"errorMessage":"Multiple paths are no longer supported for PACKER_PLUGIN_PATH.\nThis should be defined as one of the following options for your environment:\n* PACKER_PLUGIN_PATH=%v","messagePattern":"Multiple paths are no longer supported for PACKER_PLUGIN_PATH\\.\nThis should be defined as one of the following options for your environment:\n\\* PACKER_PLUGIN_PATH=(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin_folders.go","lineNumber":22,"sourceCode":"package packer\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/hashicorp/packer-plugin-sdk/pathing\"\n)\n\nvar pathSep = fmt.Sprintf(\"%c\", os.PathListSeparator)\n\n// PluginFolder returns the known plugin folder based on system.\nfunc PluginFolder() (string, error) {\n\tif packerPluginPath := os.Getenv(\"PACKER_PLUGIN_PATH\"); packerPluginPath != \"\" {\n\t\tif strings.Contains(packerPluginPath, pathSep) {\n\t\t\treturn \"\", fmt.Errorf(\"Multiple paths are no longer supported for PACKER_PLUGIN_PATH.\\n\"+\n\t\t\t\t\"This should be defined as one of the following options for your environment:\"+\n\t\t\t\t\"\\n* PACKER_PLUGIN_PATH=%v\", strings.Join(strings.Split(packerPluginPath, pathSep), \"\\n* PACKER_PLUGIN_PATH=\"))\n\t\t}\n\n\t\treturn packerPluginPath, nil\n\t}\n\n\tcd, err := pathing.ConfigDir()\n\tif err != nil {\n\t\tlog.Printf(\"[ERR] Error loading config directory: %v\", err)\n\t\treturn \"\", err\n\t}\n\n\treturn filepath.Join(cd, \"plugins\"), nil\n}\n","sourceCodeStart":4,"sourceCodeEnd":38,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin_folders.go#L4-L38","documentation":"PACKER_PLUGIN_PATH must point to a single plugin directory. Multi-path (colon/semicolon-separated) values were supported in old Packer versions but are no longer allowed, so PluginFolder returns this error when the env var contains the OS path list separator.","triggerScenarios":"PluginFolder() in packer/plugin_folders.go detects strings.Contains(envValue, os.PathListSeparator) — e.g. PACKER_PLUGIN_PATH=/opt/plugins:/home/user/plugins (unix) or C:\\a;C:\\b (windows). Callers include pluginDirectory, RunContext, loadConfig, and Discover.","commonSituations":"Reusing an old script that set multiple paths when Packer supported them; copying a PATH-style export to PACKER_PLUGIN_PATH; CI configuration combining custom and default plugin dirs.","solutions":["Set PACKER_PLUGIN_PATH to a single directory and place all plugins there.","Remove the env var entirely to use the default per-user plugin directory.","Split usage: keep one directory and symlink plugins from other locations into it."],"exampleFix":"// before\nexport PACKER_PLUGIN_PATH=/opt/plugins:$HOME/.packer.d/plugins\n// after\nexport PACKER_PLUGIN_PATH=$HOME/.packer.d/plugins\n# or remove it and let Packer use its default discovery paths","handlingStrategy":"validation","validationCode":"if v := os.Getenv(\"PACKER_PLUGIN_PATH\"); strings.Contains(v, string(os.PathListSeparator)) {\n  return fmt.Errorf(\"PACKER_PLUGIN_PATH must be a single directory, got %q\", v)\n}","typeGuard":null,"tryCatchPattern":"if dir, err := packer.PluginFolder(); err != nil {\n  if strings.Contains(err.Error(), \"Multiple paths\") {\n    // reset PACKER_PLUGIN_PATH to one directory\n  }\n}","preventionTips":["Never reuse PATH-style multi-dir exports for PACKER_PLUGIN_PATH.","Use one plugin directory and symlink extras into it.","Unset the variable to fall back to Packer's default discovery paths."],"tags":["environment","plugin-discovery","env-var"],"backgroundTag":"invalid-env-var-value","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}