Skip to content

Commit d3ce59c

Browse files
committed
Re #5585 & #6580 Doc why system-ghc: true and 'hook' incompatible
1 parent 057bb34 commit d3ce59c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/yaml_configuration.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1993,9 +1993,17 @@ The script **must** return an exit code of `0` and the standard output **must**
19931993
be the absolute path to the GHC binary that was installed. Otherwise Stack will
19941994
ignore the script and possibly fall back to its own installation procedure.
19951995

1996-
The script is not run when `system-ghc: true`.
1996+
When `system-ghc: true`, the script is not run. That is because the two
1997+
mechanisms reflect distinct concepts, namely:
19971998

1998-
When `install-ghc: false`, the script is still run, which allows you to ensure
1999+
* `system-ghc: true` causes Stack to search the PATH for a version of GHC; and
2000+
2001+
* `hooks/ghc-install.sh` causes Stack to execute a script that is intended to
2002+
send to standard output a path to a version of GHC. The path in question may
2003+
or may not be in the PATH. The script may also do other things, including
2004+
installation.
2005+
2006+
When `install-ghc: false`, the script is still run. That allows you to ensure
19992007
that only your script will install GHC and Stack won't default to its own
20002008
installation logic, even when the script fails.
20012009

0 commit comments

Comments
 (0)