Skip to content

Commit 69410bf

Browse files
committed
Misc doc tweaks, clarify how to configure STACK_ROOT
1 parent 079c864 commit 69410bf

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

doc/GUIDE.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ it. Here is an example:
17871787
-}
17881788
```
17891789
1790-
## Finding project configs, and the implicit global
1790+
## Finding project configs, and the implicit global project
17911791
17921792
Whenever you run something with stack, it needs a `stack.yaml` project file. The
17931793
algorithm stack uses to find this is:
@@ -1818,6 +1818,15 @@ configuration. It has no impact on projects at all. Every package you install
18181818
with it is put into isolated databases just like everywhere else. The only magic
18191819
is that it's the catch-all project whenever you're running stack somewhere else.
18201820
1821+
## Setting stack root location
1822+
1823+
`stack path --stack-root` will tell you the location of the "stack root". Among
1824+
other things, this is where stack stores downloaded programs and snapshot
1825+
packages. This location can be configured by setting the STACK_ROOT environment
1826+
variable or passing the `--stack-root` commandline option. It is particularly
1827+
useful to do this on Windows, where filepaths are limited (MAX_PATH), and things
1828+
can break when this limit is exceeded.
1829+
18211830
## `stack.yaml` vs `.cabal` files
18221831
18231832
Now that we've covered a lot of stack use cases, this quick summary of
@@ -2037,11 +2046,11 @@ image:
20372046
and then run `stack image container` and then `docker images` to list
20382047
the images.
20392048

2040-
Note that the executable will be built in the development environment
2041-
and copied to the container, so the dev OS must match that of the
2049+
Note that the executable will be built in the development environment
2050+
and copied to the container, so the dev OS must match that of the
20422051
container OS. This is easily accomplished using [Docker integration](docker_integration.md),
2043-
under which the exe emitted by `stack build` will be built on the
2044-
Docker container, not the local OS.
2052+
under which the exe emitted by `stack build` will be built on the
2053+
Docker container, not the local OS.
20452054

20462055
The executable will be stored under `/usr/local/bin/<your-project>-exe`
20472056
in the running container.

0 commit comments

Comments
 (0)