Treat a nonzero exit status as a failure (#3430)
And fix the test cases that have been failing ,undetected
This commit is contained in:
committed by
GitHub
parent
50cfbe8b63
commit
28a46880a2
@@ -439,6 +439,7 @@ Context* Context::context;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Context& Context::getContext ()
|
||||
{
|
||||
assert (Context::context);
|
||||
return *Context::context;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <CmdVersion.h>
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include <Datetime.h>
|
||||
#include <Context.h>
|
||||
#include <Table.h>
|
||||
#ifdef HAVE_COMMIT
|
||||
@@ -70,6 +71,8 @@ int CmdVersion::execute (std::string& output)
|
||||
link.add ("");
|
||||
link.set (link.addRow (), 0, "Documentation for Taskwarrior can be found using 'man task', 'man taskrc', 'man task-color', 'man task-sync' or at https://taskwarrior.org");
|
||||
|
||||
Datetime now;
|
||||
|
||||
Color bold;
|
||||
if (Context::getContext ().color ())
|
||||
bold = Color ("bold");
|
||||
@@ -78,7 +81,7 @@ int CmdVersion::execute (std::string& output)
|
||||
<< format ("{1} {2} built for ", bold.colorize (PACKAGE), bold.colorize (VERSION))
|
||||
<< osName ()
|
||||
<< '\n'
|
||||
<< "Copyright (C) 2006 - 2021 T. Babej, P. Beckingham, F. Hernandez."
|
||||
<< "Copyright (C) 2006 - " << now.year () << " T. Babej, P. Beckingham, F. Hernandez."
|
||||
<< '\n'
|
||||
<< '\n'
|
||||
<< disclaimer.render ()
|
||||
|
||||
Reference in New Issue
Block a user