Skip to content

Config file not automatically generated if symlink-bindir is only item in config #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bos opened this issue May 24, 2012 · 1 comment
Closed

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(Imported from Trac #523, reported by guest on 2009-03-13)

I just spent an hour trying to make cabal-install work. After reading the README, I specified the symlink-bindir in the config file. The file did not exist so I created it. Then, when I executed an update, cabal complained that there was no specified repos. I searched and could not find what variable I needed to define in the config file. Then, after skimming the cabal source code, I noticed that the config file is automatically generated if it does not exist. So I deleted it and now all is fine because it was automatically generated.

So by following the README instructions by specifying a symlink-bindir variable in a config file I created, I was unable to make cabal work.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2009-03-13)

Thanks for the report. I've updated the README. That section now says:

Quickstart on Unix systems

As a convenience for users on Unix systems there is a
bootstrap.sh script which will download and install each
of the dependencies in turn.
$ ./bootstrap.sh
It will download and install the above three dependencies.
The script will install the library packages into
$HOME/.cabal/ and the cabal program will be installed
into $HOME/.cabal/bin/.
You then have two choices:

  • put $HOME/.cabal/bin on your $PATH
  • move the cabal program somewhere that is on your $PATH
    The next thing to do is to get the latest list of packages with:
    $ cabal update
    This will also create a default config file (if it does not
    already echo exist) at $HOME/.cabal/config
    By default cabal will install programs to $HOME/.cabal/bin.
    If you do not want to add this directory to your $PATH then
    you can change the setting in the config file, for example
    you could use
    symlink-bindir: $HOME/bin
    Quickstart on Windows systems

    For Windows users we provide a pre-compiled cabal.exe
    program. Just download it and put it somewhere on your
    %PATH%, for example
    C:\Program Files\Haskell\bin.

The next thing to do is to get the latest list of packages
with
cabal update
This will also create a default config file (if it does not
already echo exist) at
C:\Documents and Settings\username\Application Data\cabal\config
The bootstrap script will report something similar:

The 'cabal' program has been installed in $CABAL_BIN/
You should either add $CABAL_BIN to your PATH
or copy the cabal program to a directory that is on your PATH.
The first thing to do is to get the latest list of packages with:
  cabal update
This will also create a default config file (if it does not already
exist) at $HOME/.cabal/config
By default cabal will install programs to $HOME/.cabal/bin
If you do not want to add this directory to your PATH then you can
change the setting in the config file, for example you could use:
symlink-bindir: $HOME/bin
else
When it prints this for real, it expands the env vars, so it refers to real paths not $CABAL_BIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant