stack2nix icon indicating copy to clipboard operation
stack2nix copied to clipboard

Running stack2nix on a folder without stack.yaml results into obscure error

Open domenkozar opened this issue 8 years ago • 2 comments

$ ~/.local/bin/stack2nix . > foo.nix
Ensuring cabal2nix version is >= 2.2.1 ...
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 1 ...
stack2nix: Failed with exit code 128...
"fatal: repository '.' does not exist\n"

The issue is that stack init is called to late, stack2nix figures out that stack.yaml doesn't exist and fallbacks to git cloning.

domenkozar avatar Aug 02 '17 14:08 domenkozar

Solved with #82

domenkozar avatar Dec 26 '17 19:12 domenkozar

Actually this still happens:

$ ~/.local/bin/stack2nix . 
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 2 ...
Ensuring ghc version is >= 8.0 ...
stack2nix: Failed with exit code 128...
"fatal: repository '.' does not exist\n"

CallStack (from HasCallStack):
  error, called at src/Stack2nix/External/Util.hs:21:3 in stack2nix-0.1.3.1-4fGTxbQftWE1cIvji4P4v6:Stack2nix.External.Util

domenkozar avatar Jan 11 '18 17:01 domenkozar