[英]How to change path of cabal config file?
I am using HaskellPlatform-2012.4.0.0 on Win7. 我在Win7上使用HaskellPlatform-2012.4.0.0。 It's installed as portable.
它以便携式方式安装。 Paths are managed through .bat file so
ghci
and ghc
works. 路径通过.bat文件管理,因此
ghci
和ghc
可以工作。
But cabal installs it self at C:\\Users\\name\\AppData\\Roaming\\cabal\\ 但是cabal自行将其安装在C:\\ Users \\ name \\ AppData \\ Roaming \\ cabal \\
To circumvent that I did: 为了规避我所做的事情:
cabal update
edit config file
delete all files except config
Changed paths: 更改的路径:
remote-repo-cache: d:\h1\cabal\packages
world-file: d:\h1\cabal\world
build-summary: d:\h1\cabal\logs\build.log
It works, but it's far from truly portable. 它可以工作,但远非真正可移植。
Cabal config is bigger problem. Cabal配置是一个更大的问题。 It seems that it must be left in C:\\Users\\name\\AppData\\Roaming\\cabal which is not portable at all.
似乎必须将其保留在C:\\ Users \\ name \\ AppData \\ Roaming \\ cabal中,该文件根本不可移植。
First run of cabal update
says Config file path source is default config file.
cabal update
第一次运行说Config file path source is default config file.
Questions: 问题:
1. where is that default config file? 1.该默认配置文件在哪里?
2. can remote-repo-cache, world-file and other paths be relative? 2. remote-repo-cache,world-file和其他路径可以相对吗?
3. is there a way of setting default cabal path so it never goes to C:\\Users\\name\\AppData\\Roaming\\cabal 3.有没有一种方法可以设置默认的阴谋路径,使它永远不会进入C:\\ Users \\ name \\ AppData \\ Roaming \\ cabal
使用以下命令运行cabal:
cabal --config-file="path/to/config"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.