sinclairtarget / um

Create and maintain your own man pages so you can remember how to do stuff
MIT License
1.8k stars 42 forks source link

Configuration parse error when using tilde in path #8

Closed buzzert closed 6 years ago

buzzert commented 6 years ago

If I set my pages_directory = ~/Sync/um, I get the following error:

Unable to parse configuration file line 2: 'pages_directory = ~/Sync/um', skipping
Your configuration file is /Users/james/.um/umconfig
/Users/james/.um/pages

um should be able to expand tilde in paths. My home directory is in a different location on my mac vs my Linux box.

duffn commented 6 years ago

That error comes from here because an entry in umconfig that starts with a tilde does not match this regex. https://github.com/sinclairtarget/um/blob/198ac377925e35979ccd625f677d93249e14549e/lib/um/umconfig.rb#L88

sinclairtarget commented 6 years ago

Fixed by fa15bbe324cd8689a5c950a7e319a4baf0e424a6. Available in the 3.1.0 release!