WPKG_OPTIONS environment variable

The wpkg tool makes use of the WPKG_OPTIONS environment variable reading it for additional options before the command line options.

In the environment variable, the options appear exactly as they would on the command line. So to always prevent the --force-overwrite, you can add the "--refuse-overwrite" command option in your WPKG_OPTIONS environment variable. The --force-overwrite will then have no effect:

export WPKG_OPTIONS="--refuse-overwrite"

Any number of options can be added to the environment variable. Note that it is not possible to add a command such as --build or --install since that would be contradictory. You can find options in the documentation as they are followed by an ellipsis, for example:

wpkg --instdir ...

Some of the options that are quite useful in the WPKG_OPTIONS are the --root and --refuse-... options.

IMPORTANT NOTE

The order of parsing is first the configuration files (global, user), the environment variable, then the actual command line options. It is not possible to modify that order and if a --refuse-... option is used in the configuration files or the environment variable, then it is just not possible at all to force that feature.