mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug Fix
- Fixed bug whereby rc: and rc. processing ignored the -- argument.
This commit is contained in:
parent
6f318ecdcf
commit
605eb397fc
1 changed files with 13 additions and 3 deletions
|
@ -309,13 +309,17 @@ void Context::loadCorrectConfigFile ()
|
|||
|
||||
// Is there an override for rc?
|
||||
foreach (arg, args)
|
||||
if (arg->substr (0, 3) == "rc:")
|
||||
{
|
||||
if (*arg == "--")
|
||||
break;
|
||||
else if (arg->substr (0, 3) == "rc:")
|
||||
{
|
||||
rc = arg->substr (3, std::string::npos);
|
||||
args.erase (arg);
|
||||
header ("Using alternate .taskrc file " + rc); // TODO i18n
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Load rc file.
|
||||
config.clear (); // Dump current values.
|
||||
|
@ -327,12 +331,16 @@ void Context::loadCorrectConfigFile ()
|
|||
|
||||
// Is there an override for data?
|
||||
foreach (arg, args)
|
||||
if (arg->substr (0, 17) == "rc.data.location:")
|
||||
{
|
||||
if (*arg == "--")
|
||||
break;
|
||||
else if (arg->substr (0, 17) == "rc.data.location:")
|
||||
{
|
||||
data = arg->substr (17, std::string::npos);
|
||||
header ("Using alternate data.location " + data); // TODO i18n
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Do we need to create a default rc?
|
||||
if (access (rc.c_str (), F_OK) &&
|
||||
|
@ -356,7 +364,9 @@ void Context::loadCorrectConfigFile ()
|
|||
std::vector <std::string> filtered;
|
||||
foreach (arg, args)
|
||||
{
|
||||
if (arg->substr (0, 3) == "rc.")
|
||||
if (*arg == "--")
|
||||
break;
|
||||
else if (arg->substr (0, 3) == "rc.")
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue