mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - config command
- Added validation of rc.annotations and rc.default.priority to the config command.
This commit is contained in:
parent
4025488cf8
commit
545013e839
3 changed files with 23 additions and 2 deletions
|
@ -708,6 +708,27 @@ int handleConfig (std::string &outs)
|
|||
// TODO Check for referenced but missing theme files.
|
||||
// TODO Check for referenced but missing string files.
|
||||
|
||||
// Check for bad values in rc.annotations.
|
||||
std::string annotations = context.config.get ("annotations");
|
||||
if (annotations != "full" &&
|
||||
annotations != "sparse" &&
|
||||
annotations != "none")
|
||||
out << "Configuration error: annotations contains an unrecognized value '"
|
||||
<< annotations
|
||||
<< "'."
|
||||
<< std::endl;
|
||||
|
||||
// Check for bad values in rc.default.priority.
|
||||
std::string defaultPriority = context.config.get ("default.priority");
|
||||
if (defaultPriority != "H" &&
|
||||
defaultPriority != "M" &&
|
||||
defaultPriority != "L" &&
|
||||
defaultPriority != "")
|
||||
out << "Configuration error: default.priority contains an unrecognized value '"
|
||||
<< defaultPriority
|
||||
<< "'."
|
||||
<< std::endl;
|
||||
|
||||
// Verify installation. This is mentioned in the documentation as the way to
|
||||
// ensure everything is properly installed.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue