Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

installing cabal-install refers to editing nonexistent file $HOME/.cabal/config #535

Closed
bos opened this Issue · 4 comments

2 participants

@bos
Owner

(Imported from Trac #542, reported by nr on 2009-04-19)

cabal --help invites me to edit a file that doesn't exist, and I can't easily find documentation for the file:

: nr@homedog 5520 ; cabal --help
This program is the command line interface to the Haskell Cabal infrastructure.
 ...
You can edit the cabal configuration file to set defaults:
  /home/nr/.cabal/config
: nr@homedog 5521 ; ls -l   /home/nr/.cabal/config
ls: cannot access /home/nr/.cabal/config: No such file or directory
@bos
Owner

(Imported comment by @dcoutts on 2009-04-19)

The config file gets created the first time you run any interesting command, like update or install.

What do you think we should do about this situation? I updated the README recently so that it's a bit clearer that one should run update before editing the config file.

@bos
Owner

(Imported comment by nr on 2009-04-19)

I think the config file should be created at install time. It's a reasonable expectation and will prevent you from having to change documentation. If you can find no other way, it's better to run 'cabal update' at install time than it is to leave things as they are now.

But it would be still better to have a cabal command just to create the config file and to run that. After all, code to 'create config if it does not already exist' has got to be right handy someplace...

@bos
Owner

(Imported comment by @dcoutts on 2009-04-21)

Replying to nr:

I think the config file should be created at install time. It's a reasonable expectation and will prevent you from having to change documentation. If you can find no other way, it's better to run 'cabal update' at install time than it is to leave things as they are now.

Unfortunately we cannot do anything at install time, only the first time the program is used.

But it would be still better to have a cabal command just to create the config file and to run that. After all, code to 'create config if it does not already exist' has got to be right handy someplace...

Right but the problem is you're not going to know that you should run that. Perhaps cabal --help should check if the config file exists before saying you can edit it. If it doesn't exist, perhaps it should suggest running cabal update.

@bos
Owner

(Imported comment by @kosmikus on 2009-12-22)

While it's obvious to me that it can't be done at install time, I fail to see why we need to wait until an "interesting" command is executed. Why can't the first invocation of cabal create the config file? Does config file creation depend on update having been run before?

@gregorycollins gregorycollins closed this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.