Skip to content

Commit 30c5115

Browse files
committed
Merge branch 'stable'
2 parents cde5e45 + b7794d4 commit 30c5115

File tree

2 files changed

+52
-13
lines changed

2 files changed

+52
-13
lines changed

doc/environment_variables.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,28 @@ Stack follows the standard at http://no-color.org/. Stack checks for a
8484
(regardless of its value), Stack prevents the addition of control character
8585
sequences for color to its output.
8686

87+
## `STACK_CONFIG`
88+
89+
Related command: all commands that make use of Stack's
90+
[global YAML configuration files](yaml_configuration.md) (`config.yaml`).
91+
92+
The environment variable `STACK_CONFIG` can be used to specify an absolute path
93+
to the user-specific global YAML configuration file, overriding the default.
94+
95+
## `STACK_GLOBAL_CONFIG`
96+
97+
Related command: all commands that make use of Stack's
98+
[global YAML configuration files](yaml_configuration.md) (`config.yaml`).
99+
100+
The environment variable `STACK_GLOBAL_CONFIG` can be used to specify an
101+
absolute path to the system-wide global YAML configuration file, overriding the
102+
default.
103+
87104
## `STACK_ROOT`
88105

89-
Related command: all commands that make use of Stack's global YAML configuration
90-
file (`config.yaml`).
106+
Related command: all commands that make use of Stack's
107+
[user-specific global YAML configuration file](yaml_configuration.md)
108+
(`config.yaml`).
91109

92110
Overridden by: Stack's global
93111
[`--stack-root`](global_flags.md#-stack-root-option) option.
@@ -111,8 +129,9 @@ the root directory of the project or package. The relative path cannot include a
111129

112130
## `STACK_XDG`
113131

114-
Related command: all commands that make use of Stack's user-specific general
115-
YAML configuration file (`config.yaml`).
132+
Related command: all commands that make use of Stack's
133+
[user-specific global YAML configuration file](yaml_configuration.md)
134+
(`config.yaml`).
116135

117136
Overridden by: the use of Stack's `STACK_ROOT` environment variable, or the use
118137
of Stack's global
@@ -124,8 +143,8 @@ set to any non-empty value.
124143

125144
## `STACK_YAML`
126145

127-
Related command: all commands that make use of Stack's project-level YAML
128-
configuration file.
146+
Related command: all commands that make use of Stack's
147+
[project-level YAML configuration file](yaml_configuration.md).
129148

130149
Overridden by: Stack's global
131150
[`--stack-yaml`](global_flags.md#-stack-yaml-option) option.

doc/yaml_configuration.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,39 @@ preference):
4040
4. A file name `stack.yaml` in the `global-project` directory in the
4141
[Stack root](stack_root.md).
4242

43-
The **global** configuration file (`config.yaml`) contains only
44-
non-project-specific options. The location of this file depends on the operating
45-
system and whether Stack is configured to use the XDG Base Directory
46-
Specification.
43+
The **global** configuration files (`config.yaml`) contain only
44+
non-project-specific options. There is a user-specific global confguration file
45+
and there may be an optional system-wide global configuration file. If a
46+
user-specific global configuration file does not exist, then Stack will create
47+
one. An option set in the user-specific file will override a corresponding
48+
option set in the system-wide file (if it exists).
49+
50+
The default location of these files depends on the operating system and, in the
51+
case of the user-specific file, whether Stack is configured to use the XDG Base
52+
Directory Specification. An absolute path to these files can be specified by the
53+
[`STACK_CONFIG`](environment_variables.md#stack_config) and
54+
[`STACK_GLOBAL_CONFIG`](environment_variables.md#stack_config) environment
55+
variables, respectively.
4756

4857
=== "Unix-like"
4958

50-
`config.yaml` is located in `/etc/stack` (for system-wide options); and/or
51-
in the [Stack root](stack_root.md) (for user-specific options).
59+
The default locations are:
60+
61+
* system-wide: `/etc/stack/config.yaml`; and
62+
* user-specific: `config.yaml` in the [Stack root](stack_root.md).
63+
64+
!!! note
65+
66+
For compatibility with Stack 0.1.5.0 and earlier, if deprecated file
67+
`/etc/stack/config` exists, then Stack will use it instead of
68+
`/etc/stack/config.yaml`.
5269

5370
=== "Windows"
5471

55-
`config.yaml` is located in the [Stack root](stack_root.md).
72+
The default locations are:
73+
74+
* system-wide: none; and
75+
* user-specific: `config.yaml` in the [Stack root](stack_root.md).
5676

5777
=== "XDG Base Directory Specification"
5878

0 commit comments

Comments
 (0)