Subject: | [PATCH] Reject configuration keys that have no non-whitespace values; strip last spaces of each configuration line. |
I my .minicpanrc I mistakenly added the line:
local: /home/ank/minicpan
with a trailing space. Minicpan then created a directory called
"minicpan " (with the trailing space.) Diff for Mini.pm:
583c583
< if (/\A(\w+):\s*(.+)\Z/sm) { $config{$1} = $2; }
---
Show quoted text
> if (/\A(\w+):\s*(\S.*?)\s*\Z/sm) { $config{$1} = $2; }
This also requires the value to contain at least one non-whitespace
charactrer.
- Andres N. Kievsky