Closed Dev3124 closed 1 year ago
The same is happening on FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272064
I found, that error fatal: destination path '.' already exists and is not an empty directory. occurs in case if git not initialized.
I found, that "spago build" somehow calls git commands, because git icon in my VS Code changes during build. So, when i initialized git in a directory, the error went away.
Could anyone explain such behavior?
I decided to try the out PureScript recently and immediately hit this roadblock. Still have no idea why, but at least I can actually try the language now, thanks to itdolmatov's comment.
git init
Maybe a quick fix would be to have Spago initialise a git repo if .git
folder is missing?
Or could throw an informative error message that instructs users to initialise a git repository.
This would really reduce friction.
We have Windows CI that shows that we can indeed install packages even if the folder is not a git repo.
Spago has been rewritten in PureScript now - you can install it via npm install -g spago@next
, so I wonder if you'd get the same error even with the new spago?
I'll close this for now, let's reopen if we find out that the new Spago has the same issue.
Had the same blocker with standard spago, and the problem does not pop up with spago@next.
I found, that error fatal: destination path '.' already exists and is not an empty directory. occurs in case if git not initialized.
I found, that "spago build" somehow calls git commands, because git icon in my VS Code changes during build. So, when i initialized git in a directory, the error went away.
Could anyone explain such behavior?
THANKS!!!
I ran into this after updating to a newer Nixpkgs version, which bumped Spago from 0.20.9 to 0.21.1. On 0.20.9, in a clean checkout spago build
worked just fine, on 0.21.1 it reports this error about a few dozen dependencies. If I first run spago build
on 0.20.9 to download the dependencies, then building with 0.21.1 does work. This is on Linux.
I see that in https://github.com/NixOS/nixpkgs/pull/305970 which updated Spago in Nixpkgs it was actually noticed that the tests fail due to this issue, but it’s unclear to me if/how that was fixed.
@ruuda this error should not occur anymore with the new Spago rewrite (versions in the 0.93.x line). It's not on nixpkgs yet but you can get it through purescript-overlay. Try that out and see if that helps.
It did! Spago 0.93.39 managed to download all packages without errors.
When I am going to install a dependency, I am getting this error
I looked for some issues and documentation, but could not find the solution. I am using spago on wildows, I am not sure if the OS is the cause.