Skip to content
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

cabal doesn't handle error conditions from getAppUserDataDirectory #700

Closed
bos opened this issue May 24, 2012 · 5 comments
Closed

cabal doesn't handle error conditions from getAppUserDataDirectory #700

bos opened this issue May 24, 2012 · 5 comments

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(Imported from Trac #709, reported by @creswick on 2010-07-12)

Distribution.Simple.InstallDirs.defaultInstallDirs fails if getAppUserDataDirectory fails, and it does so with a very uninformative error:

# On Cabal 1.8.0.2:
cabal.exe: illegal operation

This is a slight regression from the HP 2009 version:

# On Cabal 1.6.0.3:
cabal.exe: System.Directory.getAppUserDataDirectory: unsupported operation (unsupported operation)

This happens on Windows Vista, in cygwin, when the user doesn't have a windows user directory (eg: c:\users\username).

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @creswick on 2010-07-12)

This can be recreated with a windows vista system that has cygwin and a cygwin ssh server running:

  • Add a new windows user (say 'testUser'), but do not log in with that user.
  • ssh to the host as testUser
  • attempt to run cabal with some sort of command line parameters (eg: cabal --help)

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-07-13)

I suppose we could improve the error message but I don't see that we can make anything work if getAppUserDataDirectory fails. It means we cannot read the config file.

The error message issue could do with some work. We should make sure the topHandler is not throwing useful information away.

@neongreen
Copy link

In case anyone has the same problem and stumbles upon this comment: if your Windows user name contains non-latin letters (to be more precise: if the name of your home directory contains non-latin letters), and you're using MSYS, you'll get this error.

@ttuegel
Copy link
Member

ttuegel commented Apr 23, 2015

@neongreen Is this a problem if you aren't using MSYS?

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 23, 2015
@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016
@ezyang ezyang modified the milestones: Cabal 2.0, Triaged Sep 6, 2016
@jasagredo
Copy link
Collaborator

This ticket talks about Cygwin. Haskell nowadays is based on Mingw. I am preemptively closing this, please reopen otherwise.

@jasagredo jasagredo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
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

6 participants