mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
fix home_dir variable definition
This commit is contained in:
parent
4d5d901214
commit
1aa77c9ede
3 changed files with 3 additions and 6 deletions
|
@ -236,16 +236,12 @@ const char* getValue (int argc, const char** argv, std::string arg)
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static method.
|
||||
bool CLI2::getOverride (int argc, const char** argv, std::string& home, File& rc)
|
||||
bool CLI2::getOverride (int argc, const char** argv, File& rc)
|
||||
{
|
||||
const char* value = getValue (argc, argv, "rc");
|
||||
if (value == nullptr)
|
||||
return false;
|
||||
rc = File (value);
|
||||
if (rc._data.rfind ("/") != std::string::npos)
|
||||
home = rc.parent ();
|
||||
else
|
||||
home = ".";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class CLI2
|
|||
public:
|
||||
static int minimumMatchLength;
|
||||
|
||||
static bool getOverride (int, const char**, std::string&, File&);
|
||||
static bool getOverride (int, const char**, File&);
|
||||
static bool getDataLocation (int, const char**, Path&);
|
||||
static void applyOverrides (int, const char**);
|
||||
|
||||
|
|
|
@ -440,6 +440,7 @@ int Context::initialize (int argc, const char** argv)
|
|||
{
|
||||
timer_total.start ();
|
||||
int rc = 0;
|
||||
home_dir = getenv ("HOME");
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue