@@ -130,17 +130,19 @@ environment variable or if it must have a value, set it to the string `:`.
130
130
131
131
### [ ` JULIA_DEPOT_PATH ` ] (@id JULIA_DEPOT_PATH)
132
132
133
- The [ ` JULIA_DEPOT_PATH ` ] (@ref JULIA_DEPOT_PATH) environment variable is used to populate the global Julia
134
- [ ` DEPOT_PATH ` ] ( @ref ) variable, which controls where the package manager, as well
135
- as Julia's code loading mechanisms, look for package registries, installed
136
- packages, named environments, repo clones, cached compiled package images,
137
- configuration files, and the default location of the REPL's history file.
133
+ The [ ` JULIA_DEPOT_PATH ` ] (@ref JULIA_DEPOT_PATH) environment variable is used to populate the
134
+ global Julia [ ` DEPOT_PATH ` ] ( @ref ) variable, which controls where the package manager, as well
135
+ as Julia's code loading mechanisms, look for package registries, installed packages, named
136
+ environments, repo clones, cached compiled package images, configuration files, and the default
137
+ location of the REPL's history file.
138
138
139
139
Unlike the shell ` PATH ` variable but similar to [ ` JULIA_LOAD_PATH ` ] (@ref JULIA_LOAD_PATH),
140
- empty entries in [ ` JULIA_DEPOT_PATH ` ] (@ref JULIA_DEPOT_PATH) are expanded to the default
141
- value of ` DEPOT_PATH ` , excluding the user depot. This allows easy overriding of the user
142
- depot, while still retaining access to resources that are bundled with Julia, like cache
143
- files, artifacts, etc. For example, to switch the user depot to ` /foo/bar ` just do
140
+ empty entries in [ ` JULIA_DEPOT_PATH ` ] (@ref JULIA_DEPOT_PATH) have special behavior:
141
+ - At the end, it is expanded to the default value of ` DEPOT_PATH ` , * excluding* the user depot.
142
+ - At the start, it is expanded to the default value of ` DEPOT_PATH ` , * including* the user depot.
143
+ This allows easy overriding of the user depot, while still retaining access to resources that
144
+ are bundled with Julia, like cache files, artifacts, etc. For example, to switch the user depot
145
+ to ` /foo/bar ` use a trailing ` : `
144
146
``` sh
145
147
export JULIA_DEPOT_PATH=" /foo/bar:"
146
148
```
@@ -150,6 +152,12 @@ resources will still be available. If you really only want to use the depot at `
150
152
and not load any bundled resources, simply set the environment variable to ` /foo/bar `
151
153
without the trailing colon.
152
154
155
+ To append a depot at the end of the full default list, including the default user depot, use a
156
+ leading ` : `
157
+ ``` sh
158
+ export JULIA_DEPOT_PATH=" :/foo/bar"
159
+ ```
160
+
153
161
There are two exceptions to the above rule. First, if [ ` JULIA_DEPOT_PATH ` ] (@ref
154
162
JULIA_DEPOT_PATH) is set to the empty string, it expands to an empty ` DEPOT_PATH ` array. In
155
163
other words, the empty string is interpreted as a zero-element array, not a one-element
0 commit comments