Documentation
¶
Overview ¶
Package pathing determines where to put the Packer config directory based on host OS architecture and user environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
ConfigDir returns the configuration directory for Packer. NOTE: config directory will change depending on operating system dependent For Windows:
PACKER_CONFIG_DIR="" ConfigDir() => "/{homeDir()}/packer.config/ PACKER_CONFIG_DIR="bar" ConfigDir() => "/bar/packer.config/
NOTE: Default_config_present=TRUE means that there is configuration directory at old location => $HOME/.packer.d NOTE: This is not list all permutations, just some examples, view the configDir function for your OS for the exact logic For Unix:
PACKER_CONFIG_DIR="" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "$HOME/.config/packer PACKER_CONFIG_DIR="bar" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "/bar/.packer.d/ PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="" ConfigDir() => "/$HOME/.packer.d/ PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="bar" ConfigDir() => "/bar/.packer.d/
func ConfigFile ¶
ConfigFile returns the default path to the configuration file. On Unix-like systems this is the ".packerconfig" file in the home directory. On Windows, this is the "packer.config" file in the application data directory.
func ExpandUser ¶
Given a path, check to see if it's using ~ to reference a user directory. If so, then replace that component with the requested user directory. In "~/", "~" gets replaced by current user's home dir. In "~root/", "~user" gets replaced by root's home dir. ~ has to be the first character of path for ExpandUser change it.
Types ¶
This section is empty.