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

Change absolute paths to relative for index #10

Merged
merged 2 commits into from
Mar 4, 2015

Conversation

changlinli
Copy link
Contributor

Currently the index tar that is made is tarred with the absolute
filepaths of all the .cabal files that go into the tar. While this works
fine on Unix-y machines, for some reason this introduces problems on
Windows where the absolute path turns into "C: \Users..." (with an
extra space there), which makes yackage unusable on Windows. By changing
the paths of the .cabal files to be relative, we nicely sidestep this
problem.

Currently the index tar that is made is tarred with the absolute
filepaths of all the .cabal files that go into the tar. While this works
find on Unix-y machines, for some reason this introduces problems on
Windows where the absolute path turns into "C: \Users\..." (with an
extra space there), which makes yackage unusable on Windows. By changing
the paths of the .cabal files to be relative, we nicely sidestep this
problem.
@snoyberg
Copy link
Owner

snoyberg commented Mar 2, 2015

Can you describe the problem you were seeing on Windows?

@changlinli
Copy link
Contributor Author

Although cabal update was fine, cabal install failed to find the package I had uploaded. After extracting the gzipped tar that was downloaded as a result of cabal update I ended up with a nested set of directories starting with C: in my current working directory, then a directory with a space for a name, and then all the normal folders nested in. In other words I ended up with currentWorkingDirectory\C:\ \Some\More\Folders\package\0.1.0.0\package.cabal.

Was lazy and only removed the path in one place the first time around.
Removing the path from what gets passed into the tar means that some of
the functions in the where clause no longer need to have a path argument
and so those have been removed.
snoyberg added a commit that referenced this pull request Mar 4, 2015
Change absolute paths to relative for index
@snoyberg snoyberg merged commit a4425ad into snoyberg:master Mar 4, 2015
@snoyberg
Copy link
Owner

snoyberg commented Mar 4, 2015

Cool, thanks for the patch!

@changlinli
Copy link
Contributor Author

Thanks for Yackage (and all the other stuff in the Haskell ecosystem)!

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

Successfully merging this pull request may close these issues.

None yet

2 participants