[[env]] sets one during install, for example so scripts can find your tool. Each block is one variable, set for the user, or for the computer with a machine-wide install.
bach.toml
The name prefix
The app id in capitals, with other characters as_: Hello gives HELLO_, Hello Notes gives HELLO_NOTES_. This stops one app from overwriting another’s variables. To set a name that other programs read, add allow = true; Bach warns about it.
Refused names
- Windows’ own variables such as
PATH,PATHEXT,TEMP,TMP,USERPROFILE,APPDATA,LOCALAPPDATA,SYSTEMROOT,WINDIRandPROCESSOR_*, and Bach’sBACH_*. ForPATH, useadd_to_path. - Variables that load code into other programs or redirect their network traffic, even with
allow: for exampleCOR_PROFILERand otherCOR_*andCORECLR_*settings,DOTNET_STARTUP_HOOKS,JAVA_TOOL_OPTIONS,NODE_OPTIONS,PYTHONPATH,HTTP_PROXY,HTTPS_PROXY,SSL_CERT_FILEandLD_PRELOAD.
Behavior
Programs started after the install see the new variable; running programs don’t. Updates remove variables the new version no longer lists. Uninstalling removes a variable only while it still has the value setup gave it.bach inspect shows them as Variable.
Windows only.