如何初始化stack.yaml

时间:2017-12-22 18:54:43

标签: haskell-stack

stack.yaml的示例Docker configuration部分给出了:

  # Location of database used to track image usage, which `stack docker cleanup`
  # uses to determine which images should be kept.  On shared systems, it may
  # be useful to override this in the global configuration file so that
  # all users share a single database.
  database-path: "~/.stack/docker.db"

但是当我把它放在stack.yaml的新项目和stack setup时,我得到了:

Aeson exception:
Error in $.docker['database-path']: failed to parse field 'docker': failed to parse field 'database-path': InvalidAbsFile "~/.stack/docker.db"
See http://docs.haskellstack.org/en/stable/yaml_configuration/

这是only reference I could finddatabase-path,没有深入研究代码。

是否需要database-path

如果是这样:如何初始化.db文件(以缓解InvalidAbsFile "~/.stack/docker.db")?

1 个答案:

答案 0 :(得分:0)

这不是数据库初始化的问题。问题是它不会扩展~,因此您需要使用/home/dukedave/.stack/docker.db