@@ -130,17 +130,19 @@ environment variable or if it must have a value, set it to the string `:`.
130130
131131### [ ` JULIA_DEPOT_PATH ` ] (@id JULIA_DEPOT_PATH)
132132
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.
138138
139139Unlike 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 ` : `
144146``` sh
145147export JULIA_DEPOT_PATH=" /foo/bar:"
146148```
@@ -150,6 +152,12 @@ resources will still be available. If you really only want to use the depot at `
150152and not load any bundled resources, simply set the environment variable to ` /foo/bar `
151153without the trailing colon.
152154
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+
153161There are two exceptions to the above rule. First, if [ ` JULIA_DEPOT_PATH ` ] (@ref
154162JULIA_DEPOT_PATH) is set to the empty string, it expands to an empty ` DEPOT_PATH ` array. In
155163other words, the empty string is interpreted as a zero-element array, not a one-element
0 commit comments