Skip to content

Commit

Permalink
Update plugin path info
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken committed Jul 3, 2023
1 parent 142aefa commit a18bdac
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions website/content/partials/plugins/plugin-location.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
Upon the initialization of Packer, any externally installed plugin will be automatically
discovered and loaded. To consistently load plugins across template types and
operating systems Packer uses the following process to find which plugin to use.
Where applicable, some installation processes such as `packer init` may override
refer to the installation guide for any loading order overrides.
operating systems, Packer uses the following process for loading the correct plugin.
Where applicable, some installation processes such as `packer init` may override the plugin loading process.
Refer to the specific installation guides for any plugin loading overrides.

Packer plugins will usually be located within a plugins sub-directory under Packer's main config directory
[PACKER_CONFIG_DIR](/packer/docs/configure#packer-s-config-directory). If `PACKER_CONFIG_DIR` is
either not set or empty, a default equal to `$HOME/.config/packer/plugins,` or `%APPDATA%\packer.d\plugins` for Windows,
will be used.

1. All directories under the `PACKER_PLUGIN_PATH` environment variable, if `PACKER_PLUGIN_PATH`
is set. The `PACKER_PLUGIN_PATH` takes precendences overall all other plugin directories.
is set. The `PACKER_PLUGIN_PATH` takes precedences over all other plugin directories; no other directories are checked.
1. The directory where `packer` is installed, or the executable directory.
1. The current working directory, where `packer` is being executed. (`"."`)
1. The `PACKER_CONFIG_DIR/plugins` directory. `PACKER_CONFIG_DIR` refers to *[Packer's config
directory](/packer/docs/configure#packer-s-config-directory)*, if it could be found.

-> **Note:** The `PACKER_PLUGIN_PATH` environment variable can be set to more that one directory
, it will be seperated by a semicolon (`;`) on Windows systems and a
colon (`:`) on other systems. The order priority will be kept.
-> **Note:** The `PACKER_PLUGIN_PATH` environment variable can be set to more that one directories;
for example, ~/custom-dir-1:~/custom-dir-2. Separate directories in the PATH string using a colon (:) on POSIX systems
and a semicolon (;) on Windows systems. The above example path would be able to find a single or multi-component plugin
in either `~/custom-dir-1/packer-*` or `~/custom-dir-2/packer-*`.

0 comments on commit a18bdac

Please sign in to comment.