spago icon indicating copy to clipboard operation
spago copied to clipboard

`spago -x` cannot parse Windows paths

Open ozkutuk opened this issue 4 years ago • 1 comments

$ spago init
$ spago -x .\spago.dhall build
spago.exe:
Error: Invalid input

(input):1:4:
  |
1 | ./.\spago.dhall
  |    ^
unexpected '\'
expecting "", "", "", "", '/', ->, //, //\\, /\, :, end of input, keyword, operator, or whitespace

ozkutuk avatar Dec 22 '21 18:12 ozkutuk

I suspect this is a duplicate of #472, where the bug is in this line? https://github.com/purescript/spago/blob/8ce19ea5648f8bd65d6db88428bac56e66cf2560/src/Spago/Config.hs#L115

I suspect that we can get around this by patching the path in Dhall's Options and calling inputExprWithOpts instead of inputExpr here

f-f avatar Dec 23 '21 01:12 f-f

The new Spago does now allow for passing in alternate configuration files, so this does not apply anymore.

f-f avatar Sep 20 '23 18:09 f-f