Open
Description
General summary/comments
I would like to be able to use stack config set
to manipulate stack.yaml
without having to parse the config myself. However, the command only seems to work for some options (e.g. resolver
) but not others (e.g. work-dir
)
May be related to #5573
Steps to reproduce
stack new project
cd project
stack config set work-dir custom_dir_name
Expected
The file ./stack.yaml
should be modified to contain work-dir: ./custom_dir_name/
or equivalent. Subsequent stack commands for this project should use the directory ./custom_dir_name/
instead of ./.stack-work/
, creating it if it does not exist.
Actual
$ stack config set work-dir custom_dir_name --verbose
Invalid argument `work-dir'
Auxiliary command not found in path `stack-config'
File does not exist or is not a regular file `config'
Usage: stack config set COMMAND [--setup-info-yaml URL]
[--snapshot-location-base URL] [--help]
Sets a field in the project's stack.yaml to value
Stack version
$ stack --version
Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
Method of installation
$ curl -sSL https://get.haskellstack.org/ | sh