@@ -40,19 +40,39 @@ preference):
40
40
4 . A file name ` stack.yaml ` in the ` global-project ` directory in the
41
41
[ Stack root] ( stack_root.md ) .
42
42
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.
47
56
48
57
=== "Unix-like"
49
58
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`.
52
69
53
70
=== "Windows"
54
71
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).
56
76
57
77
=== "XDG Base Directory Specification"
58
78
0 commit comments