The stack config commands¶
stack config COMMAND
Available commands:
env Print environment variables for use in a shell
set Sets a key in YAML configuration file to value
The stack config commands provide assistance with accessing or modifying
Stack's configuration. See stack config for the available commands.
The stack config env command¶
stack config env [--[no-]locals] [--[no-]ghc-package-path] [--[no-]stack-exe]
[--[no-]locale-utf8] [--[no-]keep-ghc-rts]
stack config env outputs a script that sets or unsets environment variables
for a Stack environment. Flags modify the script that is output:
--[no-]locals(enabled by default) include/exclude project package information--[no-]ghc-package-path(enabled by default) setGHC_PACKAGE_PATHenvironment variable or not--[no-]stack-exe(enabled by default) setSTACK_EXEenvironment variable or not--[no-]locale-utf8(disabled by default) set theGHC_CHARENCenvironment variable toUTF-8or not--[no-]keep-ghc-rts(disabled by default) keep/discard anyGHCRTSenvironment variable
The stack config set commands¶
stack config set COMMAND
Available commands:
install-ghc Configure whether Stack should automatically install
GHC when necessary.
package-index Configure Stack's package index
resolver Change the resolver key of the current project.
snapshot Change the snapshot of the current project.
system-ghc Configure whether Stack should use a system GHC
installation or not.
The stack config set commands allow the values of keys in YAML configuration
files to be set. See stack config set for the available keys.
The stack config set install-ghc command¶
stack config set install-ghc true or false sets the install-ghc key in a
YAML configuration file, accordingly. By default, the project-level
configuration file (stack.yaml, by default) is altered. The --global flag
specifies the user-specific global configuration file (config.yaml).
The stack config set package-index download-prefix command¶
stack config set package-index download-prefix <url> sets the
download-prefix key of the package-index key in a YAML configuration file,
accordingly. By default, the project-level configuration file (stack.yaml, by
default) is altered. The --global flag specifies the user-specific global
configuration file (config.yaml).
The stack config set resolver command¶
stack config set resolver <snapshot> sets the resolver key in the
project-level configuration file (stack.yaml, by default).
A snapshot of lts or nightly will be translated into the most recent
available. A snapshot of lts-22 will be translated into the most recent
available in the lts-22 sequence.
Known bug:
- The command does not respect the presence of a
snapshotkey.
The stack config set snapshot command¶
stack config set snapshot <snapshot> sets the snapshot key in the
project-level configuration file (stack.yaml, by default).
A snapshot of lts or nightly will be translated into the most recent
available. A snapshot of lts-22 will be translated into the most recent
available in the lts-22 sequence.
Known bug:
- The command does not respect the presence of a
resolverkey.
The stack config set system-ghc command¶
stack config set system-ghc true or false sets the system-ghc key in a
YAML configuration file, accordingly. By default, the project-level
configuration file (stack.yaml, by default) is altered. The --global flag
specifies the user-specific global configuration file (config.yaml).