nix-community / dconf2nix

:feet: Convert dconf files (e.g. GNOME Shell) to Nix, as expected by Home Manager [maintainer=@jtojnar]
Apache License 2.0
218 stars 6 forks source link

Fails if input doesn't end with newline #74

Closed Layerex closed 1 year ago

Layerex commented 1 year ago

Type of bug

Parsing error

Version

0.0.12

Did you test against master?

Error message (if not timeout)

dconf2nix: "<stdin>" (line 22, column 58):
unexpected end of input
expecting new-line
CallStack (from HasCallStack):
  error, called at src/DConf2Nix.hs:35:16 in dconf2nix-0.0.12-9hDiZbiWQlV5eVEmzDB7Zt:DConf2Nix

DConf input

No response

Additional context

No response

gvolpe commented 1 year ago

Needs more info.

Layerex commented 1 year ago

A one-liner to reproduce:

dconf dump / | perl -0pe 's/\n\Z//' | dconf2nix

(Explanation of perl command: https://stackoverflow.com/a/16365256)