pkgr icon indicating copy to clipboard operation
pkgr copied to clipboard

pkgr add fails on windows

Open dpastoor opened this issue 5 years ago • 3 comments

C:\Users\DevinPastoor\Documents\pkgrbuilder\3.5\2019-10-04> pkgr add pkg                                                                                        FATA[0000] yaml: line 4: block sequence entries are not allowed in this context    

I have tried both indentation styles

Packages:
- pkg

and

Packages:
  - pkg

and add still chokes

dpastoor avatar Oct 15 '19 02:10 dpastoor

Acceptance Critera:

  • pkgr add command works properly on Windows 10

Dreznel avatar Nov 06 '19 00:11 Dreznel

Do we have any idea what might be causing this? Or should I try to just set up a Go debugger on my PC and take a crack at it?

Dreznel avatar Nov 06 '19 00:11 Dreznel

pretty sure this is caused by https://github.com/metrumresearchgroup/pkgr/blob/master/configlib/config.go#L147

windows line endings are likely the culprit. The proper implementation should be to use a bufio.Scanner() to go through line by line and let the scanner handle the line endings

dpastoor avatar Nov 06 '19 02:11 dpastoor